00001 00002 00003 00014 #ifndef __LayerImageBase_h__ 00015 #define __LayerImageBase_h__ 00016 00017 #include <vtkImageReslice.h> 00018 #include <vtkLookupTable.h> 00019 #include <vtkImageMapToColors.h> 00020 #include <vtkImageActor.h> 00021 #include <vtkImageData.h> 00022 #include "wxVtkBaseView.h" 00023 00024 class LayerImageBase 00025 { 00026 public: 00027 LayerImageBase(); 00028 virtual ~LayerImageBase(); 00029 void SetZ(int z); 00030 void SetImage(vtkImageData* image); 00031 void SetwxVtkBaseView(wxVtkBaseView *baseview); 00032 00033 void onThreshold(); 00034 void onThresholdChange(); 00035 void onThresholdInterpolation(bool interpolate); 00036 void onThresholdChangeOpacity (int opacity); 00037 void onThresholdRemove(); 00038 wxVtkBaseView *GetwxVtkBaseView(); 00039 void Refresh(); 00040 00041 private: 00042 int _Z; 00043 bool _actorPresent; 00044 vtkImageData *_image; 00045 vtkImageReslice *_imageReslicer; 00046 vtkLookupTable *_thresholdTable; 00047 vtkImageMapToColors *_thresholdMapper; 00048 vtkImageActor *_thresholdActor; 00049 wxVtkBaseView *_baseView; 00050 00051 virtual void ConfigLookupTable() = 0; 00052 bool GetActorPresent(); 00053 int CleanZ(int z); 00054 00055 00056 protected: 00057 virtual int GetZ(); 00058 vtkLookupTable* GetThresholdTable(); 00059 vtkImageData* GetImage(); 00060 }; 00061 00062 00063 00064 #endif // __LayerImageBase_h__ 00065