34 #include "vtkRenderer.h"
35 #include "vtkImageActor.h"
36 #include "vtkImageData.h"
37 #include "vtkMatrix4x4.h"
52 mActor = vtkImageActorPtr::New();
81 disconnect(mImage.get(), SIGNAL(vtkImageDataChanged()),
this, SLOT(vtkImageDataChangedSlot()));
82 disconnect(mImage.get(), SIGNAL(transformChanged()),
this, SLOT(transformChangedSlot()));
83 disconnect(mImage.get(), SIGNAL(transferFunctionsChanged()),
this, SLOT(transferFunctionsChangedSlot()));
90 connect(mImage.get(), SIGNAL(vtkImageDataChanged()),
this, SLOT(vtkImageDataChangedSlot()));
91 connect(mImage.get(), SIGNAL(transformChanged()),
this, SLOT(transformChangedSlot()));
92 connect(mImage.get(), SIGNAL(transferFunctionsChanged()),
this, SLOT(transferFunctionsChangedSlot()));
97 CX_ASSERT(mImage->getBaseVtkImageData()->GetDimensions()[2]==1);
99 mImageWithLUTProxy->setInputData(mImage->getBaseVtkImageData(), mImage->getLookupTable2D()->getOutputLookupTable());
106 this->vtkImageDataChangedSlot();
107 this->transformChangedSlot();
110 void Image2DProxy::vtkImageDataChangedSlot()
112 mActor->SetInputData(mImageWithLUTProxy->getOutput());
117 void Image2DProxy::transformChangedSlot()
123 mActor->SetUserMatrix(mImage->get_rMd().getVtkMatrix());
126 void Image2DProxy::transferFunctionsChangedSlot()
128 mImageWithLUTProxy->setInputData(mImage->getBaseVtkImageData(), mImage->getLookupTable2D()->getOutputLookupTable());
151 mProxy->setImage(image);
156 view->getRenderer()->AddActor(mProxy->getActor());
161 view->getRenderer()->RemoveActor(mProxy->getActor());
#define CX_ASSERT(statement)
boost::shared_ptr< class Image > ImagePtr
vtkSmartPointer< class vtkImageActor > vtkImageActorPtr
boost::shared_ptr< class View > ViewPtr
void setImage(ImagePtr image)
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)