X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FLayerImageBase.h;h=f9989b0176ba4f8a258f797d898f7e08b45fa3cd;hb=d40f88aeb2e3bf3619875d913eb876a6c82e6009;hp=3731e9ee1db3464e11a319de1cd66874b0f1fad7;hpb=e4ef2b5df5aac431ff3b806f83b7dd5e55e89d86;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h index 3731e9e..f9989b0 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.h @@ -42,6 +42,7 @@ #include #include #include "wxVtkBaseView.h" +#include "vtkScalarBarActor.h" #include "InteractorStyleMaracas.h" @@ -50,15 +51,21 @@ //---------------------------------------------------------------------------------- class LayerImageBase; -class ColorLayerImageBasevtkInteractor : public InteractorStyleMaracas { +class ColorLayerImageBasevtkInteractor : public InteractorStyleMaracas +{ public: ColorLayerImageBasevtkInteractor(LayerImageBase* layerImageBase); virtual ~ColorLayerImageBasevtkInteractor(); - virtual bool OnMouseMove(); + virtual bool OnChar(); + virtual bool OnMouseMove(); + virtual bool OnRightButtonDown(); + virtual bool OnRightButtonUp(); private: - LayerImageBase* _layerImageBase; + bool _state; + bool _stateKey; + LayerImageBase* _layerImageBase; protected: @@ -72,12 +79,16 @@ protected: class LayerImageBase - { + { public: LayerImageBase(); virtual ~LayerImageBase(); + void SetX(int x); + void SetY(int y); void SetZ(int z); void SetImage(vtkImageData* image); + void SetRangeForColorBar(std::vector &range); + void GetRangeForColorBar(double &minRange, double &maxRange); void SetwxVtkBaseView(wxVtkBaseView *baseview); void onThreshold(); @@ -89,26 +100,36 @@ class LayerImageBase void Refresh(); vtkLookupTable *GetvtkLookupTable(); vtkImageReslice *GetvtkImageReslice(); + virtual int GetX(); + virtual int GetY(); virtual int GetZ(); + bool GetActorPresent(); + void GetImageScalarRange(); + private: - int _Z; - bool _actorPresent; - vtkImageData *_image; - vtkImageReslice *_imageReslicer; - vtkLookupTable *_thresholdTable; - vtkImageMapToColors *_thresholdMapper; - vtkImageActor *_thresholdActor; - wxVtkBaseView *_baseView; - - virtual void ConfigLookupTable() = 0; - bool GetActorPresent(); - int CleanZ(int z); + int _X; + int _Y; + int _Z; + bool _actorPresent; + vtkImageData *_image; + vtkImageReslice *_imageReslicer; + vtkLookupTable *_thresholdTable; + vtkImageMapToColors *_thresholdMapper; + vtkImageActor *_thresholdActor; + wxVtkBaseView *_baseView; + + vtkScalarBarActor *_scalarbarActor; + + virtual void ConfigLookupTable() = 0; + void CleanXYZ(double &x, double &y, double &z); protected: - vtkLookupTable* GetThresholdTable(); - vtkImageData* GetImage(); + vtkLookupTable *GetThresholdTable(); + vtkImageData *GetImage(); + double _range[2]; + std::vector _rangeForColorBar; };