9 #include "visuVTKVRAdaptor/config.hpp" 11 #include <fwData/Image.hpp> 13 #include <fwDataTools/helper/MedicalImageAdaptor.hpp> 15 #include <fwRenderVTK/IAdaptor.hpp> 16 #include <fwRenderVTK/SRender.hpp> 18 class vtkSmartVolumeMapper;
20 class vtkColorTransferFunction;
22 class vtkPiecewiseFunction;
23 class vtkPlaneCollection;
25 class vtkVolumeProperty;
75 VISUVTKVRADAPTOR_API
SVolume() noexcept;
77 VISUVTKVRADAPTOR_API virtual ~
SVolume() noexcept;
79 static const ::
fwServices::IService::KeyType s_IMAGE_INOUT;
80 static const ::
fwServices::IService::KeyType s_TF_INOUT;
82 VISUVTKVRADAPTOR_API
void setClippingPlanesId( ::
fwRenderVTK::SRender::VtkObjectIdType
id );
84 VISUVTKVRADAPTOR_API
void setVtkClippingPlanes( vtkPlaneCollection* planes );
93 VISUVTKVRADAPTOR_API virtual
KeyConnectionsMap getAutoConnections() const override;
96 VISUVTKVRADAPTOR_API
void crop();
99 VISUVTKVRADAPTOR_API
void updateTransform();
102 VISUVTKVRADAPTOR_API
void updateCropBoxTransform();
106 VISUVTKVRADAPTOR_API
void configuring() override;
107 VISUVTKVRADAPTOR_API
void starting() override;
108 VISUVTKVRADAPTOR_API
void stopping() override;
109 VISUVTKVRADAPTOR_API
void updating() override;
110 VISUVTKVRADAPTOR_API
void swapping(const KeyType& key) override;
113 VISUVTKVRADAPTOR_API virtual
void updateTFPoints() override;
116 VISUVTKVRADAPTOR_API virtual
void updateTFWindowing(
double window,
double level) override;
119 void resetBoxWidget();
122 void activateBoxClipping(
bool activate );
125 void show(
bool isVisible );
127 void buildPipeline();
129 void updateImage( ::
fwData::Image::sptr image );
131 void updateVolumeTransferFunction( ::
fwData::Image::sptr image );
133 vtkPlaneCollection* m_clippingPlanes;
135 ::
fwRenderVTK::SRender::VtkObjectIdType m_clippingPlanesId;
137 vtkSmartVolumeMapper* m_volumeMapper;
138 vtkVolumeProperty* m_volumeProperty;
141 vtkPiecewiseFunction* m_opacityTransferFunction;
142 vtkColorTransferFunction* m_colorTransferFunction;
144 vtkCommand* m_abortCommand;
146 vtkBoxWidget2* m_boxWidget;
147 vtkCommand* m_croppingCommand;
148 vtkCommand* m_transformCommand;
151 bool m_croppingBoxDefaultState;
154 std::
string m_cropBoxTransformID;
160 vtkTransform* m_cropBoxTransform;
164 bool m_autoResetCamera;
166 double m_reductionFactor;
This class is a helper to define the connections of a service and its data.
Volume rendering adaptors.
This adaptor displays a volume image.
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderVTK contains classes for rendering with VTK.
Contains the representation of the data objects used in the framework.
Base class for VTK adaptors.