36 #include <vtkPiecewiseFunction.h>
37 #include <vtkColorTransferFunction.h>
38 #include <vtkVolumeProperty.h>
40 #ifndef CX_VTK_OPENGL2
41 #include <vtkVolumeTextureMapper3D.h>
43 #include <vtkSmartVolumeMapper.h>
47 #include <vtkGPUVolumeRayCastMapper.h>
50 #include <vtkImageData.h>
51 #include <vtkVolume.h>
52 #include <vtkRenderer.h>
53 #include <vtkMatrix4x4.h>
88 mMapper->SetBlendModeToComposite();
100 #ifndef CX_VTK_OPENGL2
101 mapper->SetPreferredMethodToNVidia();
103 mMapper->SetBlendModeToComposite();
110 view->getRenderer()->AddVolume(
mVolume);
115 view->getRenderer()->RemoveVolume(
mVolume);
136 mMapper->SetInputData( (vtkImageData*)NULL );
vtkSmartPointer< class vtkGPUVolumeRayCastMapper > vtkGPUVolumeRayCastMapperPtr
vtkSmartPointer< class vtkVolume > vtkVolumePtr
void transformChangedSlot()
virtual void addRepActorsToViewRenderer(ViewPtr view)
vtkVolumeMapperPtr mMapper
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
static ImageMapperMonitorPtr create(vtkVolumePtr volume, ImagePtr image)
void transformChanged()
emitted when transform is changed
boost::shared_ptr< class Image > ImagePtr
long mMaxVoxels
always resample volume below this size.
boost::shared_ptr< class View > ViewPtr
cx::VolumePropertyPtr mVolumeProperty
virtual ImagePtr getImage()
get the reps image
void updateVtkImageDataSlot()
virtual bool hasImage(ImagePtr image) const
check if the reps has the image
virtual void setImage(ImagePtr image)
set the reps image
void setUseGPUVolumeRayCastMapper()
void setUseVolumeTextureMapper()
void vtkImageDataChanged()
emitted when the vktimagedata are invalidated and must be retrieved anew.
vtkSmartPointer< class vtkVolumeTextureMapper3D > vtkVolumeTextureMapper3DPtr
void setMaxVolumeSize(long maxVoxels)
set max volume size for rendering. Must be set before setImage()
cx::ImageMapperMonitorPtr mMonitor
helper object for visualizing clipping/cropping
void vtkImageDataChangedSlot()