#include <bbvtkIsoSurfaceExtractor.h>
Protected Member Functions | |
virtual void | bbUserConstructor () |
virtual void | bbUserCopyConstructor () |
virtual void | bbUserDestructor () |
void | Init () |
Private Member Functions | |
BBTK_BLACK_BOX_INTERFACE (IsoSurfaceExtractor, bbtk::AtomicBlackBox) | |
BBTK_DECLARE_INPUT (In, vtkImageData *) | |
BBTK_DECLARE_INPUT (Isovalue, double) | |
BBTK_DECLARE_INPUT (Opacity, double) | |
BBTK_DECLARE_INPUT (Colour, std::vector< double >) | |
BBTK_DECLARE_INPUT (Renderer, vtkRenderer *) | |
BBTK_DECLARE_OUTPUT (Out, vtkProp3D *) | |
BBTK_PROCESS (DoProcess) | |
void | DoProcess () |
Private Attributes | |
bool | firsttime |
vtkMarchingCubes * | marchingcubes |
vtkPolyDataMapper * | polydatamapper |
vtkActor * | vtkactor |
Definition at line 67 of file bbvtkIsoSurfaceExtractor.h.
bbvtk::IsoSurfaceExtractor::BBTK_BLACK_BOX_INTERFACE | ( | IsoSurfaceExtractor | , | |
bbtk::AtomicBlackBox | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_DECLARE_INPUT | ( | In | , | |
vtkImageData * | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_DECLARE_INPUT | ( | Isovalue | , | |
double | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_DECLARE_INPUT | ( | Opacity | , | |
double | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_DECLARE_INPUT | ( | Colour | , | |
std::vector< double > | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_DECLARE_INPUT | ( | Renderer | , | |
vtkRenderer * | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_DECLARE_OUTPUT | ( | Out | , | |
vtkProp3D * | ||||
) | [private] |
bbvtk::IsoSurfaceExtractor::BBTK_PROCESS | ( | DoProcess | ) | [private] |
void bbvtk::IsoSurfaceExtractor::DoProcess | ( | ) | [private] |
Definition at line 94 of file bbvtkIsoSurfaceExtractor.cxx.
References firsttime, marchingcubes, and vtkactor.
00095 { 00096 // bbGetInputIn()->Print(std::cout); 00097 // Visualisation - result volume 00098 marchingcubes->SetInput( bbGetInputIn() ); 00099 marchingcubes->SetValue(0, bbGetInputIsovalue() ); 00100 marchingcubes->Update(); 00101 00102 vtkactor->GetProperty()->SetColor( bbGetInputColour()[0], 00103 bbGetInputColour()[1], 00104 bbGetInputColour()[2] ); 00105 00106 00107 vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() ); 00108 bbSetOutputOut( vtkactor ); 00109 00110 // Interface Update 00111 if ((firsttime==true) && (bbGetInputRenderer()!=NULL )) 00112 { 00113 firsttime=false; 00114 bbGetInputRenderer()->AddActor( vtkactor ); 00115 } 00116 }
void bbvtk::IsoSurfaceExtractor::bbUserConstructor | ( | ) | [protected, virtual] |
Definition at line 49 of file bbvtkIsoSurfaceExtractor.cxx.
00050 { 00051 Init(); 00052 std::vector<double> colour; 00053 colour.push_back(1.0); 00054 colour.push_back(1.0); 00055 colour.push_back(0.5); 00056 bbSetInputColour(colour); 00057 00058 }
void bbvtk::IsoSurfaceExtractor::bbUserCopyConstructor | ( | ) | [protected, virtual] |
Definition at line 59 of file bbvtkIsoSurfaceExtractor.cxx.
References Init().
00060 { 00061 Init(); 00062 }
void bbvtk::IsoSurfaceExtractor::bbUserDestructor | ( | ) | [protected, virtual] |
Definition at line 64 of file bbvtkIsoSurfaceExtractor.cxx.
References marchingcubes, polydatamapper, and vtkactor.
00065 { 00066 marchingcubes->Delete(); 00067 polydatamapper->Delete(); 00068 vtkactor->Delete(); 00069 }
void bbvtk::IsoSurfaceExtractor::Init | ( | ) | [protected] |
Definition at line 71 of file bbvtkIsoSurfaceExtractor.cxx.
References firsttime, marchingcubes, polydatamapper, and vtkactor.
Referenced by bbUserCopyConstructor().
00072 { 00073 firsttime=true; 00074 00075 bbSetInputIn(NULL); 00076 // bbSetInputInVtkObject(NULL); 00077 bbSetInputRenderer(NULL); 00078 bbSetInputIsovalue(400); 00079 bbSetInputOpacity(1); 00080 00081 marchingcubes = vtkMarchingCubes::New(); 00082 polydatamapper = vtkPolyDataMapper::New(); 00083 vtkactor = vtkActor::New(); 00084 00085 polydatamapper->SetInput(marchingcubes->GetOutput()); 00086 vtkactor->SetMapper(polydatamapper); 00087 00088 polydatamapper->ScalarVisibilityOff(); 00089 polydatamapper->ImmediateModeRenderingOn(); 00090 }
bool bbvtk::IsoSurfaceExtractor::firsttime [private] |
vtkMarchingCubes* bbvtk::IsoSurfaceExtractor::marchingcubes [private] |
Definition at line 72 of file bbvtkIsoSurfaceExtractor.h.
Referenced by bbUserDestructor(), DoProcess(), and Init().
vtkPolyDataMapper* bbvtk::IsoSurfaceExtractor::polydatamapper [private] |
Definition at line 73 of file bbvtkIsoSurfaceExtractor.h.
Referenced by bbUserDestructor(), and Init().
vtkActor* bbvtk::IsoSurfaceExtractor::vtkactor [private] |
Definition at line 74 of file bbvtkIsoSurfaceExtractor.h.
Referenced by bbUserDestructor(), DoProcess(), and Init().