13 #include "vtkRenderer.h" 14 #include "vtkImageActor.h" 15 #include "vtkImageData.h" 16 #include "vtkMatrix4x4.h" 31 m_rMrr = Transform3D::Identity();
32 mActor = vtkImageActorPtr::New();
61 disconnect(mImage.get(), SIGNAL(vtkImageDataChanged()),
this, SLOT(vtkImageDataChangedSlot()));
62 disconnect(mImage.get(), SIGNAL(transformChanged()),
this, SLOT(transformChangedSlot()));
63 disconnect(mImage.get(), SIGNAL(transferFunctionsChanged()),
this, SLOT(transferFunctionsChangedSlot()));
70 connect(mImage.get(), SIGNAL(vtkImageDataChanged()),
this, SLOT(vtkImageDataChangedSlot()));
71 connect(mImage.get(), SIGNAL(transformChanged()),
this, SLOT(transformChangedSlot()));
72 connect(mImage.get(), SIGNAL(transferFunctionsChanged()),
this, SLOT(transferFunctionsChangedSlot()));
79 mImageWithLUTProxy->setInputData(mImage->getBaseVtkImageData(), mImage->getLookupTable2D()->getOutputLookupTable());
86 this->vtkImageDataChangedSlot();
87 this->transformChangedSlot();
90 void Image2DProxy::vtkImageDataChangedSlot()
92 mActor->SetInputData(mImageWithLUTProxy->getOutput());
97 void Image2DProxy::transformChangedSlot()
107 mActor->SetUserMatrix(rMd.getVtkMatrix());
110 void Image2DProxy::transferFunctionsChangedSlot()
112 mImageWithLUTProxy->setInputData(mImage->getBaseVtkImageData(), mImage->getLookupTable2D()->getOutputLookupTable());
118 this->transformChangedSlot();
140 mProxy->setImage(image);
145 view->getRenderer()->AddActor(mProxy->getActor());
150 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.