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());