#ifndef _vtk_IsosurfaceManager_h_ #define _vtk_IsosurfaceManager_h_ #include "vtkImageToIsosurface.h" #include #include #include #include #include class VTK_EXPORT vtkIsosurfaceManager: public vtkObject { public: static vtkIsosurfaceManager* New(); vtkTypeRevisionMacro(vtkIsosurfaceManager, vtkObject); vtkSetObjectMacro (Input, vtkImageData); vtkGetObjectMacro (Input, vtkImageData); vtkSetObjectMacro (LUT, vtkLookupTable); vtkGetObjectMacro (LUT, vtkLookupTable); vtkSetObjectMacro (RenderWindowInteractor, vtkRenderWindowInteractor); vtkGetObjectMacro (RenderWindowInteractor, vtkRenderWindowInteractor); /** Get Isosurfaces as vtkActors */ std::vector GetIsosurfaces (void) const { return this->Isosurfaces; } /** Get the recovered isovalues from input image */ std::vector GetIsoValues (void) const { return this->IsoValues; } unsigned int GetNumberOfIsoValues (void) const { return (unsigned int)(this->IsoValues.size()); } /** Generate isosurfaces */ void GenerateData(void); /** Reset all data from the manager */ void ResetData(void); /** Specify the visibility of an isosurface */ void SetVisibility (int IsVisible); /** Specify the visibility of an isosurface */ void SetVisibility (int i, int IsVisible); /** Get the visibility of the isosurfaces */ int GetVisibility (void) const { return this->Visibility; } /** Get the visibility of the isosurfaces */ int GetVisibility (int i) const; /** Set the opacity to use for isosurfaces */ void SetOpacity (double val); /** Set the opacity of a specific isosurface */ void SetOpacity (int i, double val); /** Get the opacity used for isosurfaces */ double GetOpacity(void) const { return this->Opacity; } /** Get the opacity used for isosurfaces */ double GetOpacity(int i) const; /** Specify the Lookup Table to use for the isosurfaces */ void SetLUTValues(); /** Set the decimation On/Off */ void SetDecimationOn (void); /** Set the decimation On/Off */ void SetDecimationOff (void); protected: vtkIsosurfaceManager(); ~vtkIsosurfaceManager(); /** Update isosurfaces according to parameters */ void UpdateActors(void); private: vtkRenderWindowInteractor* RenderWindowInteractor; std::vector Isosurfaces; vtkImageData* Input; vtkLookupTable* LUT; std::vector IsoValues; double* DefaultColor; int Visibility; double Opacity; int Decimation; }; #endif