Refactor infinitiViewer.

This commit is contained in:
Krad
2022-07-01 15:38:58 +08:00
parent 62700bea0a
commit cad3c89fb8
4 changed files with 1460 additions and 1595 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -14,273 +14,324 @@
#include "Common/QGlobals.h" #include "Common/QGlobals.h"
class vtkAlgorithm; class vtkAlgorithm;
class vtkAlgorithmOutput; class vtkAlgorithmOutput;
class vtkImageStack; class vtkImageStack;
class vtkImageSlice; class vtkImageSlice;
class vtkLookupTable; class vtkLookupTable;
class vtkScalarsToColors; class vtkScalarsToColors;
class vtkImageSliceMapper; class vtkImageSliceMapper;
class vtkImageData; class vtkImageData;
class vtkInformation; class vtkInformation;
class ActorDraggableInteractorStyle; class ActorDraggableInteractorStyle;
class vtkRenderWindow; class vtkRenderWindow;
class vtkRenderer; class vtkRenderer;
class vtkRenderWindowInteractor; class vtkRenderWindowInteractor;
class ExtendMedicalImageProperties; class ExtendMedicalImageProperties;
class MeasureStore; class MeasureStore;
#define IN_TEST_MODE #define IN_TEST_MODE
#ifdef IN_TEST_MODE #ifdef IN_TEST_MODE
class vtkScalarBarActor; class vtkScalarBarActor;
#endif #endif
class vtkCornerAnnotation; class vtkCornerAnnotation;
class Measure; class Measure;
class infinitiViewer : public vtkObject
{ class infinitiViewer : public vtkObject {
public: public:
static infinitiViewer* New(); static infinitiViewer *New();
vtkTypeMacro(infinitiViewer, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent) override;
//vtkGetMacro(m_cornerAnnotation, vtkCornerAnnotation); vtkTypeMacro(infinitiViewer, vtkObject);
vtkCornerAnnotation* GetvtkCornerAnnotation()
{
return cornerAnnotation;
}
void updateCornerInfo(int index);
void updateCornerInfoAll();
void initCornerInfo(ExtendMedicalImageProperties *pSeriesTags);
void updateOrienInfo();
void setUpImageViewer();
//For Export void PrintSelf(ostream &os, vtkIndent indent) override;
void initTopLeftCornerInfo(const std::string &lbl_ser_num, const std::string &SeriesNumber);
/**
* Get the name of rendering window.
*/
virtual const char* GetWindowName();
/** //vtkGetMacro(m_cornerAnnotation, vtkCornerAnnotation);
* Render the resulting image. vtkCornerAnnotation *GetvtkCornerAnnotation() {
*/ return cornerAnnotation;
virtual void Render(); }
//@{ void UpdateCornerInfo(int index);
/**
* Set/Get the input image to the viewer.
*/
virtual void SetInputData(vtkImageData* in);
virtual vtkImageData* GetInput();
virtual void SetInputConnection(vtkAlgorithmOutput* input);
//@} void UpdateCornerInfoAll();
/** void InitCornerInfo(ExtendMedicalImageProperties *pSeries);
* Set/get the slice orientation
*/
enum void UpdateOrientationInfo();
{
SLICE_ORIENTATION_YZ = 0,
SLICE_ORIENTATION_XZ = 1,
SLICE_ORIENTATION_XY = 2
};
vtkGetMacro(SliceOrientation, int); void SetupImageViewer();
virtual void SetSliceOrientation(int orientation);
virtual void SetSliceOrientationToXY() //For Export
{ void InitTopLeftCornerInfo(const std::string &lbl_ser_num, const std::string &ser_num);
this->SetSliceOrientation(infinitiViewer::SLICE_ORIENTATION_XY);
}
virtual void SetSliceOrientationToYZ() /**
{ * Get the name of rendering window.
this->SetSliceOrientation(infinitiViewer::SLICE_ORIENTATION_YZ); */
} virtual const char *GetWindowName();
/**
* Render the resulting image.
*/
virtual void Render();
//@{
/**
* Set/Get the input image to the viewer.
*/
virtual void SetInputData(vtkImageData *in);
virtual vtkImageData *GetInput();
virtual void SetInputConnection(vtkAlgorithmOutput *input);
//@}
/**
* Set/get the slice orientation
*/
enum {
SLICE_ORIENTATION_YZ = 0,
SLICE_ORIENTATION_XZ = 1,
SLICE_ORIENTATION_XY = 2
};
vtkGetMacro(SliceOrientation, int);
virtual void SetSliceOrientation(int orientation);
virtual void SetSliceOrientationToXY() {
this->SetSliceOrientation(infinitiViewer::SLICE_ORIENTATION_XY);
}
virtual void SetSliceOrientationToYZ() {
this->SetSliceOrientation(infinitiViewer::SLICE_ORIENTATION_YZ);
}
virtual void SetSliceOrientationToXZ() {
this->SetSliceOrientation(infinitiViewer::SLICE_ORIENTATION_XZ);
}
virtual void SetSliceOrientationToXZ()
{
this->SetSliceOrientation(infinitiViewer::SLICE_ORIENTATION_XZ);
}
int GetWorldSliceOrientation(); int GetWorldSliceOrientation();
//@{ //@{
/** /**
* Set/Get the current slice to display (depending on the orientation * Set/Get the current slice to display (depending on the orientation
* this can be in X, Y or Z). * this can be in X, Y or Z).
*/ */
virtual int GetSlice(); virtual int GetSlice();
virtual void SetSlice(int s);
//@}
//@{ virtual void SetSlice(int s);
/** //@}
* Return the minimum and maximum slice values (depending on the orientation
* this can be in X, Y or Z).
*/
virtual int GetSliceMin();
virtual int GetSliceMax();
virtual void GetSliceRange(int range[2]) { this->GetSliceRange(range[0], range[1]); }
virtual void GetSliceRange(int& min, int& max);
virtual int* GetSliceRange();
//@}
void ChangeSlice(vtkObject*,unsigned long eventid,void* calldata); //@{
vtkSmartPointer<vtkPoints> GetSliceBoundPoints(); /**
* Return the minimum and maximum slice values (depending on the orientation
* this can be in X, Y or Z).
*/
virtual int GetSliceMin();
//@{ virtual int GetSliceMax();
/**
* Set window and level for mapping pixels to colors.
*/
virtual double GetColorWindow();
virtual double GetColorLevel();
virtual void SetColorWindow(double s);
virtual void SetColorLevel(double s);
void SetNegativeMode(bool negative);
void SetLookupTable(vtkLookupTable *lut);
//@}
//@{ virtual void GetSliceRange(int range[2]) { this->GetSliceRange(range[0], range[1]); }
/**
* These are here when using a Tk window.
*/
virtual void SetDisplayId(void* a);
virtual void SetWindowId(void* a);
virtual void SetParentId(void* a);
//@}
void SetZoomScale(double scale); virtual void GetSliceRange(int &min, int &max);
void SetPanOffset(const double* point);
void ResetZoomScaleToFitWindowSize();
//@{
/**
* Get the position (x and y) of the rendering window in
* screen coordinates (in pixels).
*/
virtual int* GetPosition() VTK_SIZEHINT(2);
/** virtual int *GetSliceRange();
* Set the position (x and y) of the rendering window in //@}
* screen coordinates (in pixels). This resizes the operating
* system's view/window and redraws it.
*/
virtual void SetPosition(int x, int y);
virtual void SetPosition(int a[2]) { this->SetPosition(a[0], a[1]); }
//@}
//@{ void ChangeSlice(vtkObject *, unsigned long eventid, void *calldata);
/**
* Get the size (width and height) of the rendering window in
* screen coordinates (in pixels).
*/
virtual int* GetSize() VTK_SIZEHINT(2);
/** vtkSmartPointer<vtkPoints> GetSliceBoundPoints();
* Set the size (width and height) of the rendering window in
* screen coordinates (in pixels). This resizes the operating
* system's view/window and redraws it.
*
* If the size has changed, this method will fire
* vtkCommand::WindowResizeEvent.
*/
virtual void SetSize(int width, int height);
virtual void SetSize(int a[2]) { this->SetSize(a[0], a[1]); }
//@}
//@{ //@{
/** /**
* Get the internal render window, renderer, image actor, and * Set window and level for mapping pixels to colors.
* image map instances. */
*/ virtual double GetColorWindow();
vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
vtkGetObjectMacro(Renderer, vtkRenderer);
vtkGetObjectMacro(ImageActor, vtkImageSlice);
vtkGetObjectMacro(ImageMapper, vtkImageSliceMapper);
vtkGetObjectMacro(InteractorStyle, ActorDraggableInteractorStyle);
//@}
//@{ virtual double GetColorLevel();
/**
* Set your own renderwindow and renderer
*/
virtual void SetRenderWindow(vtkRenderWindow* arg);
virtual void SetRenderer(vtkRenderer* arg);
//@}
/** virtual void SetColorWindow(double s);
* Attach an interactor for the internal render window.
*/
virtual void SetupInteractor(vtkRenderWindowInteractor*);
//@{ virtual void SetColorLevel(double s);
/**
* Create a window in memory instead of on the screen. This may not void SetNegativeMode(bool negative);
* be supported for every type of window and on some windows you may
* need to invoke this prior to the first render. void SetLookupTable(vtkLookupTable *lut);
*/ //@}
virtual void SetOffScreenRendering(vtkTypeBool);
virtual vtkTypeBool GetOffScreenRendering(); //@{
vtkBooleanMacro(OffScreenRendering, vtkTypeBool); /**
//@} * These are here when using a Tk window.
*/
virtual void SetDisplayId(void *a);
virtual void SetWindowId(void *a);
virtual void SetParentId(void *a);
//@}
void SetZoomScale(double scale);
void SetPanOffset(const double *point);
void ResetZoomScaleToFitWindowSize();
//@{
/**
* Get the position (x and y) of the rendering window in
* screen coordinates (in pixels).
*/
virtual int *GetPosition() VTK_SIZEHINT(2);
/**
* Set the position (x and y) of the rendering window in
* screen coordinates (in pixels). This resizes the operating
* system's view/window and redraws it.
*/
virtual void SetPosition(int x, int y);
virtual void SetPosition(int a[2]) { this->SetPosition(a[0], a[1]); }
//@}
//@{
/**
* Get the size (width and height) of the rendering window in
* screen coordinates (in pixels).
*/
virtual int *GetSize() VTK_SIZEHINT(2);
/**
* Set the size (width and height) of the rendering window in
* screen coordinates (in pixels). This resizes the operating
* system's view/window and redraws it.
*
* If the size has changed, this method will fire
* vtkCommand::WindowResizeEvent.
*/
virtual void SetSize(int width, int height);
virtual void SetSize(int a[2]) { this->SetSize(a[0], a[1]); }
//@}
//@{
/**
* Get the internal render window, renderer, image actor, and
* image map instances.
*/
vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
vtkGetObjectMacro(Renderer, vtkRenderer);
vtkGetObjectMacro(ImageActor, vtkImageSlice);
vtkGetObjectMacro(ImageMapper, vtkImageSliceMapper);
vtkGetObjectMacro(InteractorStyle, ActorDraggableInteractorStyle);
//@}
//@{
/**
* Set your own renderwindow and renderer
*/
virtual void SetRenderWindow(vtkRenderWindow *arg);
virtual void SetRenderer(vtkRenderer *arg);
//@}
/**
* Attach an interactor for the internal render window.
*/
virtual void SetupInteractor(vtkRenderWindowInteractor *);
//@{
/**
* Create a window in memory instead of on the screen. This may not
* be supported for every type of window and on some windows you may
* need to invoke this prior to the first render.
*/
virtual void SetOffScreenRendering(vtkTypeBool);
virtual vtkTypeBool GetOffScreenRendering();
vtkBooleanMacro(OffScreenRendering, vtkTypeBool);
//@}
vtkGetMacro(Fusion, vtkTypeBool); vtkGetMacro(Fusion, vtkTypeBool);
vtkSetMacro(Fusion, vtkTypeBool);
//@{
/**
* Fusion On and Off,if fusion is on ,the renderer will try to show Fusion Data,
* which need to be set with SetFusionInputData function. Without SetFusionInputData,
* there will no Fusion Data show.
*/
vtkBooleanMacro(Fusion, vtkTypeBool);
//@}
//@{ vtkSetMacro(Fusion, vtkTypeBool);
/** //@{
* Fusion Opacity, default is 0.5 /**
*/ * Fusion On and Off,if fusion is on ,the renderer will try to show Fusion Data,
vtkGetMacro(FusionOpacity, double); * which need to be set with SetFusionInputData function. Without SetFusionInputData,
//@} * there will no Fusion Data show.
void SetFusionOpacity(double); */
void IncreFusionOpacity(double); vtkBooleanMacro(Fusion, vtkTypeBool);
void SetScalarBarTitle(double); //@}
//@{
/**
* Set a imageData to fusion with current rendered image.
*/
void SetFusionInputData(vtkImageData*);
//@}
//@{
/**
* Set color level for fusion lookupTable, only will take effect after SetFusionInputData.
*/
void SetFusionColorLeveL(double level);
//@}
//@{ //@{
/** /**
* Set color window for fusion lookupTable, only will take effect after SetFusionInputData. * Fusion Opacity, default is 0.5
*/ */
void SetFusionColorWindow(double window); vtkGetMacro(FusionOpacity, double);
//@}
//@{ //@}
/** void SetFusionOpacity(double);
* Set a ColorTable for fusion, only will take effect after SetFusionInputData.
*/ void IncreFusionOpacity(double);
void SetFusionColorTable(vtkScalarsToColors*);
void SetScalarBarTitle(double);
//@{
/**
* Set a imageData to fusion with current rendered image.
*/
void SetFusionInputData(vtkImageData *);
//@}
//@{
/**
* Set color level for fusion lookupTable, only will take effect after SetFusionInputData.
*/
void SetFusionColorLeveL(double level);
//@}
//@{
/**
* Set color window for fusion lookupTable, only will take effect after SetFusionInputData.
*/
void SetFusionColorWindow(double window);
//@}
//@{
/**
* Set a ColorTable for fusion, only will take effect after SetFusionInputData.
*/
void SetFusionColorTable(vtkScalarsToColors *);
//@} //@}
//@{ //@{
/** /**
* Set a Preset ColorTable for fusion, only will take effect after SetFusionInputData. * Set a Preset ColorTable for fusion, only will take effect after SetFusionInputData.
*/ */
void SetFusionColorPreset(const char *preset); void SetFusionColorPreset(const char *preset);
//@} //@}
//@} //@}
//@{ //@{
/** /**
@@ -288,109 +339,123 @@ public:
*/ */
void SwitchToNextPreset(); void SwitchToNextPreset();
//@} //@}
// //
//@{ //@{
/** /**
* Remove fusion from viewer * Remove fusion from viewer
*/ */
void RemoveFusionData(); void RemoveFusionData();
//@} //@}
//@{ //@{
/** /**
* Remove fusion actor from viewer * Remove fusion actor from viewer
*/ */
void RemoveFusionActor(); void RemoveFusionActor();
void DeleteSelectedMeasure(); void DeleteSelectedMeasure();
void DeleteCurrentSliceMeasure(); void DeleteCurrentSliceMeasure();
void DeleteCurrentSeriesMeasure(); void DeleteCurrentSeriesMeasure();
void ActiveMeasure(Measure* m); void ActiveMeasure(Measure *m);
void UnActiveMeasure();
void UnActiveMeasure();
void ActiveRuler(); void ActiveRuler();
void UnActiveRuler(); void UnActiveRuler();
//for convert vtkEvent to Qt signal //for convert vtkEvent to Qt signal
vtkSignalRaiser* GetSignalRaiser(){ vtkSignalRaiser *GetSignalRaiser() {
return &raiser; return &raiser;
} }
void SyncSlicePoint(double* point);
void GetSlicePoint(double* point); void SyncSlicePoint(double *point);
void GetSlicePoint(double *point);
protected: protected:
infinitiViewer(); infinitiViewer();
~infinitiViewer() override;
~infinitiViewer() override;
vtkAlgorithm *GetInputAlgorithm();
vtkInformation *GetInputInformation();
virtual void InstallPipeline(); virtual void InstallPipeline();
virtual void UnInstallPipeline();
void PrepareFusionColorTable(vtkScalarsToColors* table, bool reset = false); virtual void UnInstallPipeline();
vtkRenderWindow* RenderWindow; void PrepareFusionColorTable(vtkScalarsToColors *table, bool reset = false);
vtkRenderer* Renderer;
vtkImageStack* ImageStack;
vtkImageSlice* ImageActor;
vtkImageSlice* FusionActor;
vtkImageSliceMapper* ImageMapper;
vtkImageSliceMapper* FusionMapper;
vtkRenderWindowInteractor* Interactor;
ActorDraggableInteractorStyle* InteractorStyle = nullptr;
vtkTextActor* OpacityActor;
vtkCornerAnnotation* cornerAnnotation;
#ifdef IN_TEST_MODE virtual void UpdateOrientation();
vtkScalarBarActor* bar;
#endif
int SliceOrientation; void LoadMeasures() {
int FirstRender;
int Slice;
int loadedMeasureSlice;
vtkTypeBool Fusion = false;
vtkTypeBool firstFusion = true;
double FusionOpacity = 0.5;
virtual void UpdateOrientation();
vtkAlgorithm* GetInputAlgorithm();
vtkInformation* GetInputInformation();
void LoadMeasures(){
LoadMeasures(false); LoadMeasures(false);
} }
void LoadMeasures(bool forceReload);
void AddMeasures(vtkObject*,unsigned long eventid,void* calldata ); void LoadMeasures(bool forceReload);
void RemoveMeasures(vtkObject*,unsigned long eventid,void* calldata );
void AddMeasures(vtkObject *, unsigned long eventid, void *calldata);
void RemoveMeasures(vtkObject *, unsigned long eventid, void *calldata);
private: private:
infinitiViewer(const infinitiViewer&) = delete; infinitiViewer(const infinitiViewer &) = delete;
void operator=(const infinitiViewer&) = delete;
std::vector<std::vector<double>> fusion_tf_vector; void operator=(const infinitiViewer &) = delete;
std::vector<std::vector<double>> fusion_tf_vector;
//for convert vtkEvent to Qt signal //for convert vtkEvent to Qt signal
vtkSignalRaiser raiser; vtkSignalRaiser raiser;
QList<Measure*>* list = nullptr; QList<Measure *> *list = nullptr;
MeasureStore* measureStore; MeasureStore *measureStore;
void raiseEvent(vtkObject* sender,unsigned long eventId,void* callData = nullptr){ void raiseEvent(vtkObject *sender, unsigned long eventId, void *callData = nullptr) {
raiser.raiseEvent(sender,eventId,callData); raiser.raiseEvent(sender, eventId, callData);
} }
void ClearCurrentSliceMeasure() const; void ClearCurrentSliceMeasure() const;
void ReloadCurrentSliceMeasure(); void ReloadCurrentSliceMeasure();
void updateTopLeftCornerInfo();
void UpdateTopLeftCornerInfo();
void RenderRuler();
vtkRenderWindow *RenderWindow;
vtkRenderer *Renderer;
vtkImageStack *ImageStack;
vtkImageSlice *ImageActor;
vtkImageSlice *FusionActor;
vtkImageSliceMapper *ImageMapper;
vtkImageSliceMapper *FusionMapper;
vtkRenderWindowInteractor *Interactor;
ActorDraggableInteractorStyle *InteractorStyle = nullptr;
vtkTextActor *OpacityActor;
vtkCornerAnnotation *cornerAnnotation;
vtkScalarBarActor *bar;
vtkNew<RulerLegendActor> ruler; vtkNew<RulerLegendActor> ruler;
bool rulerActive = false;
void RenderRuler();
int currentPresetIndex=1;
int viewUpIndex = 0;
int viewRightIndex = 1;
DicomCornerInfo m_cornerInfo;
char SOP_UID[20]={0};
double imageDataOrigin[3] = {.0, .0, .0};
vtkNew<vtkMatrix4x4> matrix; vtkNew<vtkMatrix4x4> matrix;
DicomCornerInfo m_cornerInfo;
int SliceOrientation;
int FirstRender;
int Slice;
int loadedMeasureSlice;
int currentPresetIndex = 1;
vtkTypeBool Fusion = false;
vtkTypeBool firstFusion = true;
double FusionOpacity = 0.5;
bool rulerActive = false;
char SOP_UID[20] = {0};
double imageDataOrigin[3] = {.0, .0, .0};
}; };
#endif #endif

View File

@@ -128,7 +128,7 @@ void DicomImageView::Slot_WindowLevelEventForFusion(double level, double width)
void DicomImageView::Slot_Transformation() void DicomImageView::Slot_Transformation()
{ {
mImageViewer->updateOrienInfo(); mImageViewer->UpdateOrientationInfo();
mImageViewer->Render(); mImageViewer->Render();
} }
@@ -331,9 +331,9 @@ void DicomImageView::LoadSeries(SeriesImageSet *series)
{ {
mSeries = series; mSeries = series;
mImageViewer->SetInputData(mSeries->GetData()); mImageViewer->SetInputData(mSeries->GetData());
mImageViewer->initCornerInfo(series->GetProperty()); mImageViewer->InitCornerInfo(series->GetProperty());
mImageViewer->setUpImageViewer(); mImageViewer->SetupImageViewer();
mImageViewer->updateOrienInfo(); mImageViewer->UpdateOrientationInfo();
//以下是一些转接函数 //以下是一些转接函数
//使用connect 替代 AddObserver,避免出现多种事件机制架构 //使用connect 替代 AddObserver,避免出现多种事件机制架构
connect(mImageViewer->GetSignalRaiser(),&vtkSignalRaiser::raiseEvent, this, &DicomImageView::syncEventFunc); connect(mImageViewer->GetSignalRaiser(),&vtkSignalRaiser::raiseEvent, this, &DicomImageView::syncEventFunc);
@@ -350,7 +350,7 @@ void DicomImageView::LoadSeries(SeriesImageSet *series)
//Callbacks------------------------------------------------------------------------------------ //Callbacks------------------------------------------------------------------------------------
void DicomImageView::updateWindowLevelCb(vtkObject* caller, unsigned long eid, void *calldata) void DicomImageView::updateWindowLevelCb(vtkObject* caller, unsigned long eid, void *calldata)
{ {
mImageViewer->updateCornerInfo(BOTTOM_RIGHT); mImageViewer->UpdateCornerInfo(BOTTOM_RIGHT);
emit Signal_WindowLevelEventForFusion(mImageViewer->GetColorLevel(), mImageViewer->GetColorWindow()); emit Signal_WindowLevelEventForFusion(mImageViewer->GetColorLevel(), mImageViewer->GetColorWindow());
} }
@@ -538,7 +538,7 @@ void DicomImageView::SetWindowLevel(double level, double width)
mImageViewer->SetColorWindow(width); mImageViewer->SetColorWindow(width);
//You have to call updateConerInfo manually //You have to call updateConerInfo manually
//only mouse event can rely on callback //only mouse event can rely on callback
mImageViewer->updateCornerInfo(BOTTOM_RIGHT); mImageViewer->UpdateCornerInfo(BOTTOM_RIGHT);
emit Signal_WindowLevelEventForFusion(level, width); emit Signal_WindowLevelEventForFusion(level, width);
} }
@@ -652,7 +652,7 @@ void DicomImageView::updateCornerInfoAll()
{ {
if (HasSeries()) if (HasSeries())
{ {
mImageViewer->updateCornerInfoAll(); mImageViewer->UpdateCornerInfoAll();
} }
} }
@@ -660,7 +660,7 @@ void DicomImageView::updateCornerInfoPrivacy()
{ {
if (HasSeries()) if (HasSeries())
{ {
mImageViewer->updateCornerInfo(TOP_RIGHT); mImageViewer->UpdateCornerInfo(TOP_RIGHT);
} }
} }
@@ -802,8 +802,5 @@ void DicomImageView::viewerClicked() {
} }
void DicomImageView::SyncScrollBar() { void DicomImageView::SyncScrollBar() {
// setScrollChangedType(scrollScope::TriggerType::SYNC_ONLY);
mScrollBar->SetValueSilently(mImageViewer->GetSlice()); mScrollBar->SetValueSilently(mImageViewer->GetSlice());
mImageViewer->updateCornerInfo(TOP_LEFT);
// setScrollChangedType(scrollScope::TriggerType::USER_TRIGGER);
} }

View File

@@ -594,7 +594,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->Rotate(90, ROTATE_90_CCW); curV->Rotate(90, ROTATE_90_CCW);
//curV->getImageViewer()->updateOrienInfo();
} }
}); });
@@ -603,7 +602,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->Rotate(-90, ROTATE_90_CW); curV->Rotate(-90, ROTATE_90_CW);
//curV->getImageViewer()->updateOrienInfo();
} }
}); });
m->addAction(tr("Rotate 180"), this, [&] { m->addAction(tr("Rotate 180"), this, [&] {
@@ -611,7 +609,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->Rotate(180, ROTATE_180); curV->Rotate(180, ROTATE_180);
//curV->getImageViewer()->updateOrienInfo();
} }
}); });
@@ -621,7 +618,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->HFlip(); curV->HFlip();
//curV->getImageViewer()->updateOrienInfo(H_FLIP);
} }
}); });
m->addAction(tr("Flip vertical"), this, [&] { m->addAction(tr("Flip vertical"), this, [&] {
@@ -629,7 +625,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->VFlip(); curV->VFlip();
//curV->getImageViewer()->updateOrienInfo(V_FLIP);
} }
}); });
@@ -639,7 +634,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->ClearTransformations(); curV->ClearTransformations();
//curV->getImageViewer()->updateOrienInfo(CLEAR);
} }
}); });
flipBtn->setPopupMode(QToolButton::MenuButtonPopup); flipBtn->setPopupMode(QToolButton::MenuButtonPopup);
@@ -650,7 +644,6 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
if (curV != nullptr && curV->HasSeries()) if (curV != nullptr && curV->HasSeries())
{ {
curV->Rotate(90, ROTATE_90_CCW); curV->Rotate(90, ROTATE_90_CCW);
//curV->getImageViewer()->updateOrienInfo(ROTATE_90_CCW);
} }
}); });
} }