]> Creatis software - clitk.git/blobdiff - vv/vvToolProfile.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolProfile.h
index ecccf06f5abe4737c8a280af93f666762b9f9377..8297a90d738778d2fa48d3b873e5b4c87764b51e 100644 (file)
 #ifndef VVTOOLPROFILE_H
 #define VVTOOLPROFILE_H
 
+#include <QtGlobal>
+#if QT_VERSION >= 0x050000
 #include <QtUiPlugin/QDesignerExportWidget>
+#else
+#include <QtDesigner/QDesignerExportWidget>
+#endif
 
 #include "vvToolBase.h"
 #include "vvToolWidgetBase.h"
 #include "vvImageContour.h"
+#include "vvLandmarks.h"
+#include <vtkVersion.h>
+#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9
 #include "ui_vvToolProfile.h"
+#else
+#include "ui_vvToolProfileVTK7.h"
+#endif
+#include "vvBinaryImageOverlayActor.h"
 
 #include "clitkProfileImage_ggo.h"
+#include "clitkProfileImageGenericFilter.h"
+#include <vtkTable.h>
+#include <vtkContextView.h>
+#include <vtkContextScene.h>
+#include <vtkTransformPolyDataFilter.h>
 
 //------------------------------------------------------------------------------
 class vvToolProfile:
@@ -40,45 +57,44 @@ class vvToolProfile:
 
   //-----------------------------------------------------
   static void Initialize();
+  void InitializeLine();
   void GetArgsInfoFromGUI();
   virtual void InputIsSelected(vvSlicerManager * m);
 
   bool isPointsSelected();
+  void computeProfile();
+  void SetPoints();
 
   //-----------------------------------------------------
   public slots:
   virtual void apply();
   virtual bool close();
   virtual void reject();
-  void valueChangedT1(double v);
-  void valueChangedT2(double v);
-  void UpdateOrientation(int slicer, int orientation);
-  void UpdateSlice(int slicer,int slices);
-  void enableLowerThan(bool b);
-  void useFGBGtoggled(bool);
-  void InteractiveDisplayToggled(bool b);
-  //  void LeftButtonReleaseEvent(int slicer);
   
   void selectPoint1();
   void selectPoint2();
   void cancelPoints();
-  void computeProfile();
+  void SaveAs();
+  void DisplayLine(int);
+  void DeleteLine(int);
 
  protected:
   void RemoveVTKObjects();
   virtual void closeEvent(QCloseEvent *event);
   Ui::vvToolProfile ui;
   args_info_clitkProfileImage mArgsInfo;
-  std::vector<vvImageContour::Pointer> mImageContour;
-  std::vector<vvImageContour::Pointer> mImageContourLower;
-  bool mInteractiveDisplayIsEnabled;
-  
-  int* mPoint1;
-  int* mPoint2;
-  bool point1Selected;
-  bool point2Selected;
   
-  void Update(int slicer);
+  double* mPoint1;
+  double* mPoint2;
+  bool mPoint1Selected;
+  bool mPoint2Selected;
+  vtkSmartPointer<vtkContextView> mView;
+  clitk::ProfileImageGenericFilter::Pointer mFilter;
+  std::string mTextFileName;
+  std::vector<vtkSmartPointer<vtkActor> > mLineActors;
+  vtkSmartPointer<vtkPolyData> mLinesPolyData;
+  vtkSmartPointer<vtkTransformPolyDataFilter> mLineTransform;
+
 
 }; // end class vvToolProfile
 //------------------------------------------------------------------------------