34 #include "vtkRenderer.h" 35 #include "vtkImageActor.h" 36 #include "vtkImageData.h" 37 #include "vtkMatrix4x4.h" 52 m_rMrr = Transform3D::Identity();
53 mActor = vtkImageActorPtr::New();
82 disconnect(mImage.get(), SIGNAL(vtkImageDataChanged()),
this, SLOT(vtkImageDataChangedSlot()));
83 disconnect(mImage.get(), SIGNAL(transformChanged()),
this, SLOT(transformChangedSlot()));
84 disconnect(mImage.get(), SIGNAL(transferFunctionsChanged()),
this, SLOT(transferFunctionsChangedSlot()));
91 connect(mImage.get(), SIGNAL(vtkImageDataChanged()),
this, SLOT(vtkImageDataChangedSlot()));
92 connect(mImage.get(), SIGNAL(transformChanged()),
this, SLOT(transformChangedSlot()));
93 connect(mImage.get(), SIGNAL(transferFunctionsChanged()),
this, SLOT(transferFunctionsChangedSlot()));
100 mImageWithLUTProxy->setInputData(mImage->getBaseVtkImageData(), mImage->getLookupTable2D()->getOutputLookupTable());
107 this->vtkImageDataChangedSlot();
108 this->transformChangedSlot();
111 void Image2DProxy::vtkImageDataChangedSlot()
113 mActor->SetInputData(mImageWithLUTProxy->getOutput());
118 void Image2DProxy::transformChangedSlot()
128 mActor->SetUserMatrix(rMd.getVtkMatrix());
131 void Image2DProxy::transferFunctionsChangedSlot()
133 mImageWithLUTProxy->setInputData(mImage->getBaseVtkImageData(), mImage->getLookupTable2D()->getOutputLookupTable());
139 this->transformChangedSlot();
161 mProxy->setImage(image);
166 view->getRenderer()->AddActor(mProxy->getActor());
171 view->getRenderer()->RemoveActor(mProxy->getActor());
#define CX_ASSERT(statement)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class Image > ImagePtr
vtkSmartPointer< class vtkImageActor > vtkImageActorPtr
boost::shared_ptr< class View > ViewPtr
void setImage(ImagePtr image)
void setTransformOffset(Transform3D rMrr)
vtkSmartPointer< class vtkLookupTable > vtkLookupTablePtr
Default implementation of Rep.
vtkImageActorPtr getActor()
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
boost::shared_ptr< class Image2DProxy > Image2DProxyPtr
static Image2DProxyPtr New()
void setImage(ImagePtr image)
Helper class for applying sscLUT2D to an image.
virtual void addRepActorsToViewRenderer(ViewPtr view)
Namespace for all CustusX production code.