43 #include <vtkRenderer.h>
44 #include <vtkFloatArray.h>
45 #include <vtkPlaneSource.h>
46 #include <vtkPointData.h>
47 #include <vtkTriangleFilter.h>
48 #include <vtkStripper.h>
49 #include <vtkImageData.h>
50 #include <vtkLookupTable.h>
60 #ifndef CX_VTK_OPENGL2
61 #include <vtkPainterPolyDataMapper.h>
87 for (
unsigned i=0; i<mProxy.size(); ++i)
95 reportWarning(
"Slices3DRep::setImages: No input images (in ViewGroup)");
98 for (
unsigned i=0; i<mProxy.size(); ++i)
100 mProxy[i]->setImages(images);
101 mProxy[i]->getSliceProxy()->setDefaultCenter(images[0]->get_rMd().coord(images[0]->boundingBox().center()));
108 sliceProxy->initializeFromPlane(plane,
false,
Vector3D(0,0,1),
true, 150, 0.25);
109 sliceProxy->setAlwaysUseDefaultCenter(
true);
112 current->setSliceProxy(sliceProxy);
113 current->setTargetSpaceToR();
115 mProxy.push_back(current);
120 for (
unsigned i=0; i<mProxy.size(); ++i)
121 mProxy[i]->getSliceProxy()->setTool(tool);
126 for (
unsigned i=0; i<mProxy.size(); ++i)
127 view->getRenderer()->AddActor(mProxy[i]->getActor());
132 for (
unsigned i=0; i<mProxy.size(); ++i)
133 view->getRenderer()->RemoveActor(mProxy[i]->getActor());
void setShaderPath(QString path)
static SliceProxyPtr create(PatientModelServicePtr dataManager)
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
static Texture3DSlicerProxyPtr New()
boost::shared_ptr< class View > ViewPtr
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
boost::shared_ptr< class Slices3DRep > Slices3DRepPtr
void reportWarning(QString msg)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Default implementation of Rep.
boost::shared_ptr< class Texture3DSlicerProxy > Texture3DSlicerProxyPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
void setImages(std::vector< ImagePtr > images)
virtual void addRepActorsToViewRenderer(ViewPtr view)
void setTool(ToolPtr tool)
void addPlane(PLANE_TYPE plane, PatientModelServicePtr dataManager)
static Slices3DRepPtr New(const QString &uid)
boost::shared_ptr< class Tool > ToolPtr