Reference Line resize.
This commit is contained in:
@@ -29,7 +29,7 @@ void MeasureStore::Store(QString SeriesUid, int plane, int slice, Measure *measu
|
|||||||
|
|
||||||
QList<Measure *> *MeasureStore::GetMeasures(QString SeriesUid, int plane, int slice) {
|
QList<Measure *> *MeasureStore::GetMeasures(QString SeriesUid, int plane, int slice) {
|
||||||
|
|
||||||
qDebug() << "measure SeriesUid:" << SeriesUid << ", plane:" << plane << ", slice:" << slice;
|
// qDebug() << "measure SeriesUid:" << SeriesUid << ", plane:" << plane << ", slice:" << slice;
|
||||||
if (!store.contains(SeriesUid))
|
if (!store.contains(SeriesUid))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (!store[SeriesUid].contains(plane))
|
if (!store[SeriesUid].contains(plane))
|
||||||
|
|||||||
@@ -563,6 +563,12 @@ void infinitiViewer::updateReferenceLine(vtkPoints* worldPts){
|
|||||||
Render();
|
Render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void infinitiViewer::modifiedReferenceLine(){
|
||||||
|
//model to world
|
||||||
|
referenceLine->Modified();
|
||||||
|
Render();
|
||||||
|
}
|
||||||
|
|
||||||
void infinitiViewer::SyncSlicePoint(double *point) {
|
void infinitiViewer::SyncSlicePoint(double *point) {
|
||||||
double focusPoint[4] = {.0, .0, .0, 1.0};
|
double focusPoint[4] = {.0, .0, .0, 1.0};
|
||||||
focusPoint[0] = point[0] - imageDataOrigin[0];
|
focusPoint[0] = point[0] - imageDataOrigin[0];
|
||||||
@@ -588,6 +594,13 @@ void infinitiViewer::SetZoomScale(double scale) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double infinitiViewer::GetZoomScale(){
|
||||||
|
if (Renderer) {
|
||||||
|
return Renderer->GetActiveCamera()->GetParallelScale();
|
||||||
|
}
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
void infinitiViewer::ResetZoomScaleToFitWindowSize() {
|
void infinitiViewer::ResetZoomScaleToFitWindowSize() {
|
||||||
vtkImageData *inputData = nullptr;
|
vtkImageData *inputData = nullptr;
|
||||||
if (Renderer && (inputData = GetInput())) {
|
if (Renderer && (inputData = GetInput())) {
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ vtkTypeMacro(infinitiViewer, vtkObject);
|
|||||||
|
|
||||||
void updateReferenceLine(vtkPoints* pts);
|
void updateReferenceLine(vtkPoints* pts);
|
||||||
|
|
||||||
|
void modifiedReferenceLine();
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
* Set window and level for mapping pixels to colors.
|
* Set window and level for mapping pixels to colors.
|
||||||
@@ -194,6 +196,8 @@ vtkTypeMacro(infinitiViewer, vtkObject);
|
|||||||
|
|
||||||
void SetZoomScale(double scale);
|
void SetZoomScale(double scale);
|
||||||
|
|
||||||
|
double GetZoomScale();
|
||||||
|
|
||||||
void applyPanOffset(const double *point);
|
void applyPanOffset(const double *point);
|
||||||
|
|
||||||
void shiftCamera(const double *point);
|
void shiftCamera(const double *point);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "dicomimageview.h"
|
#include "dicomimageview.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@@ -156,6 +156,7 @@ void DicomImageView::loadSeries(SeriesImageSet *series) {
|
|||||||
style->AddObserver(ActorDraggableInteractorStyle::DoubleClickEvent, this, &DicomImageView::doubleClickHandle);
|
style->AddObserver(ActorDraggableInteractorStyle::DoubleClickEvent, this, &DicomImageView::doubleClickHandle);
|
||||||
style->AddObserver(ActorDraggableInteractorStyle::ScalarOpacityEvent, this, &DicomImageView::scalarEventHandle);
|
style->AddObserver(ActorDraggableInteractorStyle::ScalarOpacityEvent, this, &DicomImageView::scalarEventHandle);
|
||||||
style->AddObserver(ActorDraggableInteractorStyle::ScalarShiftEvent, this, &DicomImageView::scalarEventHandle);
|
style->AddObserver(ActorDraggableInteractorStyle::ScalarShiftEvent, this, &DicomImageView::scalarEventHandle);
|
||||||
|
|
||||||
}
|
}
|
||||||
initScrollbar();
|
initScrollbar();
|
||||||
mIsSlotInited = true;
|
mIsSlotInited = true;
|
||||||
@@ -258,8 +259,12 @@ void DicomImageView::resizeEvent(QResizeEvent *event) {
|
|||||||
if (!mImageViewer) return;
|
if (!mImageViewer) return;
|
||||||
if (mImageViewer->GetvtkCornerAnnotation()) {
|
if (mImageViewer->GetvtkCornerAnnotation()) {
|
||||||
mImageViewer->GetvtkCornerAnnotation()->SetMaximumFontSize(FontSizeHelper::getSize(frameGeometry().size()));
|
mImageViewer->GetvtkCornerAnnotation()->SetMaximumFontSize(FontSizeHelper::getSize(frameGeometry().size()));
|
||||||
mImageViewer->Render();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// force update ReferenceLine data
|
||||||
|
mImageViewer->modifiedReferenceLine();
|
||||||
|
mImageViewer->Render();
|
||||||
if (mIsCine) {
|
if (mIsCine) {
|
||||||
int ax = (this->geometry().bottomLeft().x() + this->geometry().bottomRight().x()) / 2 +
|
int ax = (this->geometry().bottomLeft().x() + this->geometry().bottomRight().x()) / 2 +
|
||||||
VCRHelper::getVCRXOffset();
|
VCRHelper::getVCRXOffset();
|
||||||
|
|||||||
@@ -113,10 +113,12 @@ public:
|
|||||||
|
|
||||||
void setSlice(int slice);
|
void setSlice(int slice);
|
||||||
|
|
||||||
|
//Sync zoom
|
||||||
void setZoomScale(double scale);
|
void setZoomScale(double scale);
|
||||||
|
|
||||||
void setZoomFactor(double factor);
|
void setZoomFactor(double factor);
|
||||||
|
|
||||||
|
// sync pan
|
||||||
void applyPanOffset(double *p);
|
void applyPanOffset(double *p);
|
||||||
|
|
||||||
void shiftCamera(double *p);
|
void shiftCamera(double *p);
|
||||||
|
|||||||
Reference in New Issue
Block a user