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