37 #include <vtkVolume.h>
38 #include <vtkAbstractVolumeMapper.h>
39 #include <vtkPlaneCollection.h>
40 #include <vtkVolumeMapper.h>
59 connect(
mImage.get(), SIGNAL(clipPlanesChanged()),
this, SLOT(clipPlanesChangedSlot()));
74 void ImageMapperMonitor::clipPlanesChangedSlot()
85 for (
unsigned i=0; i<mPlanes.size(); ++i)
87 mVolume->GetMapper()->RemoveClippingPlane(mPlanes[i]);
99 mPlanes =
mImage->getAllClipPlanes();
100 for (
unsigned i=0; i<mPlanes.size(); ++i)
102 mVolume->GetMapper()->AddClippingPlane(mPlanes[i]);
120 mapper->SetCropping(
mImage->getCropping());
124 mapper->SetCroppingRegionPlanes(bb_d.begin());
vtkSmartPointer< class vtkVolume > vtkVolumePtr
static ImageMapperMonitorPtr create(vtkVolumePtr volume, ImagePtr image)
virtual void applyCropping()
boost::shared_ptr< class Image > ImagePtr
boost::shared_ptr< class ImageMapperMonitor > ImageMapperMonitorPtr
vtkSmartPointer< class vtkVolumeMapper > vtkVolumeMapperPtr
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
virtual void applyClipping()
ImageMapperMonitor(vtkVolumePtr volume, ImagePtr image)
virtual void clearClipping()