60 mSlicePlanesProxy->addSimpleSlicePlane(
ptSAGITTAL, dm);
61 mSlicePlanesProxy->addSimpleSlicePlane(
ptCORONAL, dm);
62 mSlicePlanesProxy->addSimpleSlicePlane(
ptAXIAL, dm);
63 mSlicePlanesProxy->addSimpleSlicePlane(
ptANYPLANE, dm);
64 mSlicePlanesProxy->addSimpleSlicePlane(
ptSIDEPLANE, dm);
69 connect(mSlicePlaneClipper.get(), SIGNAL(slicePlaneChanged()),
this, SLOT(changedSlot()));
70 connect(
this, SIGNAL(
changed()),
this, SLOT(changedSlot()));
71 connect(mBackend->trackingService.get(), SIGNAL(activeToolChanged(
const QString&)),
this, SLOT(activeToolChangedSlot()));
73 this->activeToolChangedSlot();
80 if (mSlicePlaneClipper->getSlicer() && mSlicePlaneClipper->getSlicer()->getComputer().getPlaneType() == plane)
83 if (mSlicePlanesProxy->getData().count(plane))
85 mSlicePlaneClipper->setSlicer(mSlicePlanesProxy->getData()[plane].mSliceProxy);
95 mImage->addPersistentClipPlane(mSlicePlaneClipper->getClipPlaneCopy());
101 mImage->clearPersistentClipPlanes();
106 if (!mSlicePlaneClipper->getSlicer())
108 return mSlicePlaneClipper->getSlicer()->getComputer().getPlaneType();
117 return mSlicePlaneClipper->getInvertPlane();
126 mSlicePlaneClipper->setInvertPlane(on);
130 PLANE_TYPE InteractiveClipper::getPlaneType()
132 if (!mSlicePlaneClipper->getSlicer())
134 return mSlicePlaneClipper->getSlicer()->getComputer().getPlaneType();
150 void InteractiveClipper::changedSlot()
157 PLANE_TYPE currentPlane = this->getPlaneType();
161 if (!std::count(planes.begin(), planes.end(), currentPlane))
165 currentPlane = ptCOUNT;
169 currentPlane = planes.front();
174 mSlicePlaneClipper->setSlicer(mSlicePlanesProxy->getData()[currentPlane].mSliceProxy);
175 mImage->setInteractiveClipPlane(mSlicePlaneClipper->getClipPlane());
186 std::vector<PLANE_TYPE> retval;
188 for (SlicePlanesProxy::DataMap::iterator iter = data.begin(); iter != data.end(); ++iter)
190 retval.push_back(iter->first);
195 void InteractiveClipper::activeToolChangedSlot()
197 ToolPtr activTool = mBackend->trackingService->getActiveTool();
200 for (SlicePlanesProxy::DataMap::iterator iter = data.begin(); iter != data.end(); ++iter)
202 iter->second.mSliceProxy->setTool(activTool);
ptCORONAL
a slice seen from the front of the patient
boost::shared_ptr< class SlicePlanesProxy > SlicePlanesProxyPtr
std::vector< PLANE_TYPE > getAvailableSlicePlanes() const
bool getUseClipper() const
std::map< PLANE_TYPE, DataType > DataMap
boost::shared_ptr< class Image > ImagePtr
ptAXIAL
a slice seen from the top of the patient
void saveClipPlaneToVolume()
save the current clip to image
ptSAGITTAL
a slice seen from the side of the patient
void invertPlane(bool on)
ImagePtr getImage() const
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
bool getInvertPlane() const
Helper class for managing a set of slice planes.
ptRADIALPLANE
y-rotated 90* relative to anyplane (bird's view)
static SlicePlaneClipperPtr New()
boost::shared_ptr< class CoreServices > CoreServicesPtr
void setSlicePlane(PLANE_TYPE plane)
InteractiveClipper(CoreServicesPtr backend)
ptANYPLANE
a plane aligned with the tool base plane
vtkSmartPointer< class vtkPlane > vtkPlanePtr
PLANE_TYPE getSlicePlane()
void setImage(ImagePtr image)
void clearClipPlanesInVolume()
clear all saved clips in the image.
ptSIDEPLANE
z-rotated 90* relative to anyplane (dual anyplane)
boost::shared_ptr< class Tool > ToolPtr