7 #ifndef __VISUVTKADAPTOR_SIMAGE_HPP__ 8 #define __VISUVTKADAPTOR_SIMAGE_HPP__ 10 #include "visuVTKAdaptor/config.hpp" 12 #include <fwData/Image.hpp> 14 #include <fwDataTools/helper/MedicalImageAdaptor.hpp> 16 #include <fwRenderVTK/IAdaptor.hpp> 18 #include <vtkSmartPointer.h> 21 class vtkImageMapToColors;
70 VISUVTKADAPTOR_API
SImage() noexcept;
72 VISUVTKADAPTOR_API virtual ~
SImage() noexcept;
74 static const ::
fwServices::IService::KeyType s_IMAGE_INOUT;
75 static const ::
fwServices::IService::KeyType s_TF_INOUT;
79 void setVtkImageRegisterId(
std::
string id)
81 m_imageRegisterId = id;
85 void setVtkImageRegister(vtkObject* obj)
87 m_imageRegister = obj;
91 void setImageOpacity(
double opacity)
93 m_imageOpacity = opacity;
97 void setAllowAlphaInTF(
bool allow)
99 m_allowAlphaInTF = allow;
104 VISUVTKADAPTOR_API
void configuring()
override;
105 VISUVTKADAPTOR_API
void starting()
override;
106 VISUVTKADAPTOR_API
void updating()
override;
107 VISUVTKADAPTOR_API
void stopping()
override;
108 VISUVTKADAPTOR_API
void swapping(
const KeyType& key)
override;
119 VISUVTKADAPTOR_API
virtual KeyConnectionsMap getAutoConnections()
const override;
121 virtual void buildPipeline();
122 virtual void destroyPipeline();
124 void updateImage( ::fwData::Image::sptr image );
127 void updateImageOpacity();
128 void updateImageTransferFunction();
131 VISUVTKADAPTOR_API
virtual void updateTFPoints()
override;
134 VISUVTKADAPTOR_API
virtual void updateTFWindowing(
double window,
double level)
override;
138 std::string m_imageRegisterId;
139 vtkObject* m_imageRegister;
142 double m_imageOpacity;
143 bool m_allowAlphaInTF;
145 vtkSmartPointer< fwVtkWindowLevelLookupTable > m_lut;
146 vtkSmartPointer< vtkImageMapToColors > m_map2colors;
147 vtkSmartPointer< vtkImageData > m_imageData;
153 #endif // __VISUVTKADAPTOR_SIMAGE_HPP__ Render an image on the generic scene.
This class is a helper to define the connections of a service and its data.
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Reinplementation of vtkWindowLevelLookupTable : add specific out-of-bounds colors.
Base class for VTK adaptors.