/** * \file * \brief Class ThresholdImageView . */ /** * \class ThresholdImageView * \brief */ #ifndef __LayerImageBase_h__ #define __LayerImageBase_h__ #include #include #include #include #include #include "wxVtkBaseView.h" #include "InteractorStyleMaracas.h" //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- class LayerImageBase; class ColorLayerImageBasevtkInteractor : public InteractorStyleMaracas { public: ColorLayerImageBasevtkInteractor(LayerImageBase* layerImageBase); virtual ~ColorLayerImageBasevtkInteractor(); virtual bool OnMouseMove(); private: LayerImageBase* _layerImageBase; protected: }; //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- class LayerImageBase { public: LayerImageBase(); virtual ~LayerImageBase(); void SetZ(int z); void SetImage(vtkImageData* image); void SetwxVtkBaseView(wxVtkBaseView *baseview); void onThreshold(); void onThresholdChange(); void onThresholdInterpolation(bool interpolate); void onThresholdChangeOpacity (int opacity); void onThresholdRemove(); wxVtkBaseView *GetwxVtkBaseView(); void Refresh(); vtkLookupTable *GetvtkLookupTable(); vtkImageReslice *GetvtkImageReslice(); virtual int GetZ(); 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); protected: vtkLookupTable* GetThresholdTable(); vtkImageData* GetImage(); }; #endif // __LayerImageBase_h__