7 #include "fwRenderVTK/vtk/fwVtkBoxRepresentation.hpp" 8 #include "fwRenderVTK/vtk/fwVtkPicker.hpp" 9 #include "fwRenderVTK/vtk/fwVtkCellPicker.hpp" 10 #include "fwRenderVTK/vtk/InteractorStyle2DForNegato.hpp" 11 #include "fwRenderVTK/vtk/InteractorStyle3DForNegato.hpp" 12 #include "fwRenderVTK/vtk/Instantiator.hpp" 14 #include <fwCore/base.hpp> 16 #include <vtkInstantiator.h> 17 #include <vtkVersion.h> 19 #if (VTK_MAJOR_VERSION < 6 || (VTK_MAJOR_VERSION == 6 && VTK_MINOR_VERSION < 1)) 20 extern vtkObject* vtkInstantiatorfwVtkBoxRepresentationNew();
21 extern vtkObject* vtkInstantiatorfwVtkPickerNew();
22 extern vtkObject* vtkInstantiatorfwVtkCellPickerNew();
23 extern vtkObject* vtkInstantiatorInteractorStyle2DForNegatoNew();
24 extern vtkObject* vtkInstantiatorInteractorStyle3DForNegatoNew();
39 void Instantiator::ClassInitialize()
41 vtkInstantiator::RegisterInstantiator(
"fwVtkBoxRepresentation", vtkInstantiatorfwVtkBoxRepresentationNew);
42 vtkInstantiator::RegisterInstantiator(
"fwVtkPicker", vtkInstantiatorfwVtkPickerNew);
43 vtkInstantiator::RegisterInstantiator(
"fwVtkCellPicker", vtkInstantiatorfwVtkCellPickerNew);
44 vtkInstantiator::RegisterInstantiator(
"InteractorStyle2DForNegato", vtkInstantiatorInteractorStyle2DForNegatoNew);
45 vtkInstantiator::RegisterInstantiator(
"InteractorStyle3DForNegato", vtkInstantiatorInteractorStyle3DForNegatoNew);
50 o = vtkInstantiator::CreateInstance(
"fwVtkBoxRepresentation");
51 SLM_ASSERT(
"Unable to instantiate a fwVtkBoxRepresentation",o);
55 o = vtkInstantiator::CreateInstance(
"fwVtkPicker");
56 SLM_ASSERT(
"Unable to instantiate a fwVtkPicker",o);
59 o = vtkInstantiator::CreateInstance(
"fwVtkCellPicker");
60 SLM_ASSERT(
"Unable to instantiate a fwVtkCellPicker",o);
63 o = vtkInstantiator::CreateInstance(
"InteractorStyle2DForNegato");
64 SLM_ASSERT(
"Unable to instantiate a InteractorStyle2DForNegato",o);
67 o = vtkInstantiator::CreateInstance(
"InteractorStyle3DForNegato");
68 SLM_ASSERT(
"Unable to instantiate a InteractorStyle3DForNegato",o);
73 void Instantiator::ClassFinalize()
75 vtkInstantiator::UnRegisterInstantiator(
"fwVtkBoxRepresentation", vtkInstantiatorfwVtkBoxRepresentationNew);
76 vtkInstantiator::UnRegisterInstantiator(
"fwVtkPicker", vtkInstantiatorfwVtkPickerNew);
77 vtkInstantiator::UnRegisterInstantiator(
"fwVtkCellPicker", vtkInstantiatorfwVtkCellPickerNew);
78 vtkInstantiator::UnRegisterInstantiator(
"InteractorStyle2DForNegato", vtkInstantiatorInteractorStyle2DForNegatoNew);
79 vtkInstantiator::UnRegisterInstantiator(
"InteractorStyle3DForNegato", vtkInstantiatorInteractorStyle3DForNegatoNew);
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
The namespace fwRenderVTK contains classes for rendering with VTK.