13 #include <vtkRenderer.h>
14 #include <vtkVolumeMapper.h>
15 #include <vtkImageData.h>
43 mPatientModelService(patientModelService)
45 this->setVisualizerType();
57 mTrackedStream = trackedStream;
64 this->newTool(mTrackedStream->getProbeTool());
65 this->newVideoSource(mTrackedStream->getVideoSource());
69 void StreamRep3D::newTool(
ToolPtr tool)
78 ImagePtr image = mTrackedStream->getChangingImage();
82 this->initTransferFunction(image);
84 mVideoSource = videoSource;
89 void StreamRep3D::initTransferFunction(
ImagePtr image)
95 opacity[200] = image->getMaxAlphaValue();
96 tf3D->resetAlpha(opacity);
97 image->setTransferFunctions3D(tf3D);
102 return mTrackedStream;
107 return "StreamRep3D";
110 void StreamRep3D::setVisualizerType()
112 QString visualizerType =
settings()->
value(
"View3D/ImageRender3DVisualizer").toString();
113 if(visualizerType ==
"vtkVolumeTextureMapper3D")
115 else if(visualizerType ==
"vtkGPUVolumeRayCastMapper")
118 reportError(QString(
"StreamRep3D::setVisualizerType(): No visualizer found for string=%1").arg(visualizerType));