${PROJECT_SOURCE_DIR}/lib/GUI/Wx/VolumeRenderer
-
+ ${PROJECT_SOURCE_DIR}/lib/GUI/Base/VolumeRenderer
${PROJECT_SOURCE_DIR}/lib/Kernel/VTKObjects/ViewerWidgets
${PROJECT_SOURCE_DIR}/lib/Kernel/VTKObjects/VolumeRenderer
# DEPENDENCIES (LIBRARIES TO LINK WITH)
SET ( ${EXE_NAME}_LINK_LIBRARIES
GUIQtViewers
- GUIQtVolumeRenderer
- KernelVolumeRenderer
- KernelViewerWidgets
- ${VTK_LIBRARIES}
+ GUIQtVolumeRenderer
+ ITKVTKImport
+ #${VTK_LIBRARIES}
${QT_LIBRARIES}
- QVTK
+ QVTK
# ${WXWIDGETS_LIBRARIES}
# ${KWWidgets_LIBRARIES}
# ${VTK_LIBRARIES}
- ${ITK_LIBRARIES}
+ # ${ITK_LIBRARIES}
# ${GDCM_LIBRARIES}
# ${BOOST_LIBRARIES}
if (argc < 2)
{
- std::cout << "ERROR: data file name argument missing."
+ std::cout << "ERROR: Image filename missing, Filename RGB Image 2D"
<< std::endl ;
return EXIT_FAILURE;
}
# Add a ADD_SUBDIRECTORY command for each of your libraries
ADD_SUBDIRECTORY(Qt)
ADD_SUBDIRECTORY(Wx)
-
\ No newline at end of file
+ADD_SUBDIRECTORY(Base)
+
this->m_VolumeRender->SetRenderer(this->getRenderer());
+ this->m_VolumeRender->SetInteractor(this->_qtvtkviewer->GetRenderWindow()->GetInteractor());
}
QtVTKViewerWidget::~QtVTKViewerWidget()
void setImage(vtkImageData* img);
- void SetLookupTable(vtkLookupTable *lookuptable);
+ void SetLookupTable(vtkLookupTable *lookuptable);
private slots:
void on_checkBoxShowPlanes_clicked();
<ui version="4.0">
<class>QtVTKViewerWidget</class>
<widget class="QWidget" name="QtVTKViewerWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>626</width>
- <height>624</height>
- </rect>
- </property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="font">
- <font>
- <pointsize>14</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Viewer Controls</string>
- </property>
- </widget>
- </item>
- <item>
+ <widget class="QToolBox" name="toolBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>1</number>
+ </property>
+ <widget class="QWidget" name="page">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>239</width>
+ <height>417</height>
+ </rect>
+ </property>
+ <attribute name="label">
+ <string>Image Widget</string>
+ </attribute>
<widget class="QCheckBox" name="checkBoxShowPlanes">
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>111</width>
+ <height>22</height>
+ </rect>
+ </property>
<property name="text">
<string>Show Planes</string>
</property>
<bool>false</bool>
</property>
</widget>
- </item>
- <item>
- <widget class="QtVolumeRendererPanel" name="m_VolumeRender" native="true"/>
- </item>
- </layout>
+ </widget>
+ <widget class="QWidget" name="page_2">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>176</width>
+ <height>417</height>
+ </rect>
+ </property>
+ <attribute name="label">
+ <string>Volume Rendering</string>
+ </attribute>
+ <widget class="QtVolumeRendererPanel" name="m_VolumeRender" native="true">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>181</width>
+ <height>121</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>10</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </widget>
+ </widget>
</item>
<item>
<widget class="QtVTKViewer" name="_qtvtkviewer" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>1</horstretch>
+ <horstretch>8</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
# ${BOOST_LIBRARIES}
${QT_LIBRARIES}
QVTK
- KernelVolumeRenderer
+ BaseVolumeRenderer
# If this library must link against other libraries
# USER! : Add here any extra Library you need
#include "qtvolumerendererpanel.h"
#include "ui_qtvolumerendererpanel.h"
+#include "qmessagebox.h"
+
+using namespace std;
QtVolumeRendererPanel::QtVolumeRendererPanel(QWidget *parent) :
QWidget(parent),
ui(new Ui::QtVolumeRendererPanel)
{
- ui->setupUi(this);
- m_volrenddata = 0;
- m_ImageData = 0;
- m_Render = 0;
+ ui->setupUi(this);
}
QtVolumeRendererPanel::~QtVolumeRendererPanel()
void QtVolumeRendererPanel::on_checkBoxShowVolume_clicked(bool checked)
{
- if(checked){
- invariant();
- m_volrenddata = new VolumeRendererManagerData(m_ImageData, m_Render);
- }else{
- delete m_volrenddata;
- m_volrenddata = 0;
+ try{
+ ShowVolume(checked);
+ on_opacitySlider_valueChanged(this->ui->opacitySlider->value());
+ }catch(char * e){
+ cout<<e<<endl;
+ QMessageBox::critical(this, tr("Volume Rendering"), tr(e), QMessageBox::Ok);
}
}
-void QtVolumeRendererPanel::invariant(){
- if(!m_ImageData){
- cout<<"Image data not set"<<endl;
- throw "Image data not set";
- }
- if(!m_Render){
- cout<<"renderer not initialized"<<endl;
- throw "renderer not initialized";
- }
-}
void QtVolumeRendererPanel::on_opacitySlider_valueChanged(int value)
{
- if(m_volrenddata){
+ try{
+ this->ui->lineEditOpacity->setText(QString::number(value));
+
+ double* range = ImageData->GetScalarRange();
+ vector<double> greylevel;
+ greylevel.push_back(range[0]);
+ greylevel.push_back(range[1]);
+ vector<double> vectvalue;
+ vectvalue.push_back(value/100.0);
+ vectvalue.push_back(value/100.0);
+
+ OpacityChanged(greylevel, vectvalue);
+ }catch(char * e){
+ cout<<e<<endl;
+ QMessageBox::critical(this, tr("Volume Rendering"), tr(e), QMessageBox::Ok);
+ }
+}
+
+void QtVolumeRendererPanel::on_checkBoxBoundingBox_clicked(bool checked)
+{
+ try{
+ BoundingBoxChanged(checked);
+ }catch(char * e){
+ cout<<e<<endl;
+ QMessageBox::critical(this, tr("Volume Rendering"), tr(e), QMessageBox::Ok);
}
}
#include <QWidget>
-#include "volumerenderermanagerdata.h"
+#include "volumerendererdata.h"
namespace Ui {
class QtVolumeRendererPanel;
}
-class QtVolumeRendererPanel : public QWidget
+class QtVolumeRendererPanel : public QWidget, public VolumeRendererData
{
Q_OBJECT
public:
explicit QtVolumeRendererPanel(QWidget *parent = 0);
- ~QtVolumeRendererPanel();
-
- /*
- * set the image data to the volume renderer
- */
- void SetImageData(vtkImageData* img){
- m_ImageData = img;
- }
-
- /**
- */
- void SetRenderer(vtkRenderer* render){
- m_Render = render;
- }
-
-
- void SetLookUpTable(vtkLookupTable *lookuptable){
- m_Lookuptable = lookuptable;
- }
+ ~QtVolumeRendererPanel();
private slots:
void on_checkBoxShowVolume_clicked(bool checked);
- void on_opacitySlider_valueChanged(int value);
+ void on_opacitySlider_valueChanged(int value);
+
+ void on_checkBoxBoundingBox_clicked(bool checked);
private:
Ui::QtVolumeRendererPanel *ui;
void invariant();
-protected:
- VolumeRendererManagerData* m_volrenddata;
- vtkImageData* m_ImageData;
- vtkRenderer* m_Render;
- vtkLookupTable* m_Lookuptable;
};
#endif // QTVOLUMERENDERERPANEL_H
<rect>
<x>0</x>
<y>0</y>
- <width>432</width>
- <height>360</height>
+ <width>147</width>
+ <height>107</height>
</rect>
</property>
<property name="windowTitle">
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Volume Rendering Controls</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QCheckBox" name="checkBoxShowVolume">
+ <property name="toolTip">
+ <string>Add or remove the volume from the viewer</string>
+ </property>
+ <property name="text">
+ <string>Show</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxBoundingBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Bounding box to view the volume, control the bounding box with the handles</string>
+ </property>
+ <property name="text">
+ <string>Box</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
- <widget class="QToolBox" name="toolBox">
- <property name="currentIndex">
- <number>1</number>
- </property>
- <widget class="QWidget" name="page">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>414</width>
- <height>257</height>
- </rect>
- </property>
- <attribute name="label">
- <string>Add/Remove</string>
- </attribute>
- <widget class="QCheckBox" name="checkBoxShowVolume">
- <property name="geometry">
- <rect>
- <x>50</x>
- <y>40</y>
- <width>121</width>
- <height>22</height>
- </rect>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Opacity</string>
</property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="lineEditOpacity">
<property name="text">
- <string>Show Volume</string>
+ <string>100</string>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
</property>
</widget>
- </widget>
- <widget class="QWidget" name="page_2">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>414</width>
- <height>257</height>
- </rect>
- </property>
- <attribute name="label">
- <string>Opacity</string>
- </attribute>
+ </item>
+ <item row="1" column="0" colspan="2">
<widget class="QSlider" name="opacitySlider">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>141</width>
- <height>21</height>
- </rect>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="mouseTracking">
+ <bool>false</bool>
</property>
<property name="toolTip">
<string>Changes the opacity of the volume rendered</string>
<enum>QSlider::TicksAbove</enum>
</property>
</widget>
- <zorder>opacitySlider</zorder>
- <zorder>label</zorder>
- </widget>
- </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>checkBoxShowVolume</tabstop>
+ <tabstop>checkBoxBoundingBox</tabstop>
+ <tabstop>opacitySlider</tabstop>
+ <tabstop>lineEditOpacity</tabstop>
+ </tabstops>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>checkBoxShowVolume</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>checkBoxBoundingBox</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>57</x>
+ <y>21</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>110</x>
+ <y>25</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkBoxShowVolume</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>opacitySlider</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>61</x>
+ <y>30</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>47</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
_zwidget->SetLookupTable(lookuptable);
}
+void ImagePlaneWidget::SetColorTable(vtkColorTransferFunction *colortransfer){
+ SetLookupTable((vtkLookupTable*)colortransfer);
+}
+
void ImagePlaneWidget::showPlanes(bool show){
this->invariant();
if(show){
#include "vtkRendererCollection.h"
#include "vtkImagePlaneWidget.h"
#include "vtkImageData.h"
+#include "vtkColorTransferFunction.h"
class ImagePlaneWidget
{
virtual void SetLookupTable(vtkLookupTable *lookuptable);
+ virtual void SetColorTable(vtkColorTransferFunction *lookuptable);
+
virtual void showPlanes(bool show);
void initialize(vtkRenderWindowInteractor* interactor);
** Start of data viewmanagerData
*********************************************************************************************/
+#include "vtkStripper.h"
+#include "boxSurfaceObserver.h"
+#include "vtkProperty.h"
+
+using namespace std;
+
VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, std::string dataname){
Initialize(vol, dataname);
Initialize(vol, dataname);
render->AddActor(this->getProp3D());
+
}
-void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string dataname){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, bool usegpu, std::string dataname){
+ Initialize(vol, dataname, usegpu);
+}
+
+void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string dataname, bool usegpu){
_vol = vol;
- _dataname = dataname;
+ _dataname = dataname;
_tfun = vtkPiecewiseFunction::New();
_ctfun = vtkColorTransferFunction::New();
_volumePlanes = vtkPlanes::New();
- _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
- _MIPFunction = vtkVolumeRayCastMIPFunction::New();
- _volumeMapper = vtkVolumeRayCastMapper::New();
- _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
- _volumeMapper->SetClippingPlanes( _volumePlanes );
- _volumeMapper->AutoAdjustSampleDistancesOn();
_volumeProperty = vtkVolumeProperty::New();
_volumeProperty->SetInterpolationTypeToLinear();
//_volumeProperty->ShadeOn();
_volumeProperty->SetColor(_ctfun);
_volumeProperty->SetScalarOpacity(_tfun );
+
_newvol = vtkVolume::New();
- _newvol->SetMapper(_volumeMapper );
_newvol->SetProperty(_volumeProperty );
- _volumeMapper->SetInput( _vol );
- _volumeMapper->Update();
+
+ _volumeMapper = 0;
+ _volumeMappergpu = 0;
+ _compositeFunction = 0;
+ _MIPFunction = 0;
+ _boxWidgetS1 = 0;
+
+ if(usegpu && _vol->GetDataDimension() > 2){
+ _volumeMappergpu = vtkGPUVolumeRayCastMapper::New();
+ _volumeMappergpu->SetClippingPlanes( _volumePlanes );
+ _volumeMappergpu->AutoAdjustSampleDistancesOn();
+
+ _newvol->SetMapper(_volumeMappergpu );
+
+ _volumeMappergpu->SetInput( _vol );
+ _volumeMappergpu->Update();
+ }else{
+ _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
+ _MIPFunction = vtkVolumeRayCastMIPFunction::New();
+
+ _volumeMapper = vtkVolumeRayCastMapper::New();
+ _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
+ _volumeMapper->SetClippingPlanes( _volumePlanes );
+ _volumeMapper->AutoAdjustSampleDistancesOn();
+
+ _newvol->SetMapper(_volumeMapper );
+
+ _volumeMapper->SetInput( _vol );
+ _volumeMapper->Update();
+ }
+
_newvol->Update();
}
_tfun->Delete();
_ctfun->Delete();
_volumePlanes->Delete();
- _compositeFunction->Delete();
- _volumeMapper->Delete();
_volumeProperty->Delete();
_newvol->Delete();
+ if(_compositeFunction)
+ _compositeFunction->Delete();
+ if(_MIPFunction)
+ _MIPFunction->Delete();
+ if(_volumeMapper)
+ _volumeMapper->Delete();
+ if(_volumeMappergpu)
+ _volumeMappergpu->Delete();
+ if(_boxWidgetS1){
+ DisableBoundingBox();
+ }
+
+}
+
+void VolumeRendererManagerData::EnableBoundingBox(vtkRenderWindowInteractor* interactor){
+ if(_volumeMappergpu){
+ _boxWidgetS1 = vtkBoxWidget::New();
+ _boxWidgetS1->SetInteractor( interactor );
+ _boxWidgetS1->SetPlaceFactor(1.01);
+
+ _boxWidgetS1->SetInput( _vol );
+ _boxWidgetS1->InsideOutOn();
+ _boxWidgetS1->PlaceWidget();
+
+ vtkBoxWidgetCallback *callback = vtkBoxWidgetCallback::New();
+ callback->SetMapper(_volumeMappergpu);
+ _boxWidgetS1->AddObserver(vtkCommand::InteractionEvent, callback);
+ callback->Delete();
+ _boxWidgetS1->EnabledOn();
+ _boxWidgetS1->GetSelectedFaceProperty()->SetOpacity(0.0);
+ }
+}
+
+void VolumeRendererManagerData::DisableBoundingBox(){
+ if(_boxWidgetS1){
+ _boxWidgetS1->EnabledOff();
+ _boxWidgetS1->Delete();
+ _boxWidgetS1 = 0;
+ }
}
+
/**
** Set Volume Color
**/
{
_ctfun->RemoveAllPoints();
- for(int i = 0; i < greylevelcolors.size();i++){
+ for(unsigned int i = 0; i < greylevelcolors.size();i++){
_ctfun->AddRGBPoint(greylevelcolors[i], red[i],green[i], blue[i]);
//std::cout<<"VolumeRendererManagerData::setVolumeColor "<<greylevelcolors[i]<<" "<<red[i]<<" "<<green[i]<<" "<<blue[i]<<std::endl;
}
void VolumeRendererManagerData::setVolumeOpacity(std::vector<double> greylevel,std::vector<double> value){
_tfun->RemoveAllPoints();
- for(int i = 0; i < greylevel.size();i++){
+ for(unsigned int i = 0; i < greylevel.size();i++){
_tfun->AddPoint(greylevel[i], value[i]);
- //std::cout<<"VolumeRendererManagerData::setVolumeOpacity "<<greylevel[i]<<" "<< value[i]<<std::endl;
+ //std::cout<<"VolumeRendererManagerData::setVolumeOpacity "<<greylevel[i]<<" "<< value[i]<<std::endl;
}
_newvol->Update();
}
+/**
+** Volume Opacity
+**/
+void VolumeRendererManagerData::setVolumeOpacity(std::vector<double> greylevel,double value){
+ std::vector<double> valuevector;
+ for(unsigned i = 0; i < greylevel.size(); i++){
+ valuevector.push_back(value);
+ }
+ setVolumeOpacity(greylevel, valuevector);
+}
+
/**
** Check if the variables are setted correctly
**/
if(!_MIPFunction){
throw "No MIP function initialized";
}
- if(!_volumeMapper){
+ if(!_volumeMapper && !_volumeMappergpu){
throw "No volume mapper initialized";
}
}
void VolumeRendererManagerData::changeCompositeMIPFunction(int function) throw (char *){
checkInvariant();
- if(function == 0){
- _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
- }else{
- _volumeMapper->SetVolumeRayCastFunction(_MIPFunction);
+ if(_volumeMapper){
+ if(function == 0){
+ _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
+ }else{
+ _volumeMapper->SetVolumeRayCastFunction(_MIPFunction);
+ }
}
}
void VolumeRendererManagerData::SetLookupTable(vtkLookupTable* lookuptable){
_ctfun->RemoveAllPoints();
- _ctfun->DeepCopy((vtkColorTransferFunction*)lookuptable);
+ vtkColorTransferFunction* colort = (vtkColorTransferFunction*)lookuptable;
+ for(int i = 0; i < colort->GetSize(); i++){
+ double val[6];
+ colort->GetNodeValue(i, val);
+ //cout<< val[0]<<" "<< val[1]<<" "<<val[2]<<" "<< val[3]<<endl;
+ _ctfun->AddRGBPoint(val[0], val[1], val[2], val[3]);
+ }
+ _newvol->Update();
}
#include <vtkVolumeRayCastMIPFunction.h>
#include <vtkLookupTable.h>
#include <vector>
+#include <vtkBoxWidget.h>
+#include <vtkGPUVolumeRayCastMapper.h>
+#include "vtkCommand.h"
+// Callback for moving the planes from the box widget to the mapper
+class vtkBoxWidgetCallback : public vtkCommand
+{
+public:
+ static vtkBoxWidgetCallback *New()
+ { return new vtkBoxWidgetCallback; }
+ virtual void Execute(vtkObject *caller, unsigned long, void*)
+ {
+ vtkBoxWidget *widget = reinterpret_cast<vtkBoxWidget*>(caller);
+ if (this->Mapper)
+ {
+ vtkPlanes *planes = vtkPlanes::New();
+ widget->GetPlanes(planes);
+ this->Mapper->SetClippingPlanes(planes);
+ planes->Delete();
+ }
+ }
+ void SetMapper(vtkGPUVolumeRayCastMapper* m)
+ { this->Mapper = m; }
+
+protected:
+ vtkBoxWidgetCallback()
+ { this->Mapper = 0; }
+
+ //vtkVolumeRayCastMapper *Mapper;
+ vtkGPUVolumeRayCastMapper *Mapper;
+};
-class VolumeRendererManagerData {
+
+class VolumeRendererManagerData : public vtkObject{
public:
VolumeRendererManagerData(vtkImageData* vol, std::string dataname="");
VolumeRendererManagerData(vtkImageData* vol, vtkRenderer* render, std::string dataname="");
+ VolumeRendererManagerData(vtkImageData* vol, bool usegpu, std::string dataname="");
~VolumeRendererManagerData();
/**
** Volume Opacity
**/
void setVolumeOpacity(std::vector<double> greylevel,std::vector<double> value);
+ /**
+ ** Volume Opacity
+ **/
+ void setVolumeOpacity(std::vector<double> greylevel,double value);
vtkPiecewiseFunction* GetTransferFunction(){
return _tfun;
void SetLookupTable(vtkLookupTable* lookuptable);
+ void EnableBoundingBox(vtkRenderWindowInteractor* interactor);
+ void DisableBoundingBox();
protected:
/**
* Prop 3D (data actor)
vtkVolumeRayCastCompositeFunction *_compositeFunction;
vtkPlanes *_volumePlanes;
vtkVolumeRayCastMapper *_volumeMapper;
+ vtkGPUVolumeRayCastMapper *_volumeMappergpu;
vtkVolumeProperty *_volumeProperty;
vtkVolume *_newvol;
vtkPiecewiseFunction* _tfun;
vtkColorTransferFunction* _ctfun;
vtkVolumeRayCastMIPFunction* _MIPFunction;
+ /**
+ ** boxwidget to control the volume
+ **/
+ vtkBoxWidget* _boxWidgetS1;
- void Initialize(vtkImageData* vol, std::string dataname);
+ void Initialize(vtkImageData* vol, std::string dataname, bool usegpu = false);
};
#include "wxMaracasRendererView.h"
#include "wxMaracasRenderTabbedPanel.h"
-#include "volumerenderermanager.h".h"
+#include "volumerenderermanager.h"
#include "wxMaracasSurfaceRenderingManager.h"
class creaMaracasVisu_EXPORT wxMaracasRendererView : public wxPanel
boxSurfaceObserver* observer = boxSurfaceObserver::New();
vtkStripper* striper = vtkStripper::New();
- striper->SetInput( _cleanFilter->GetOutput() );
+ striper->SetInput( _cleanFilter->GetOutput() );
//striper->SetInput( _cubesFilter->GetOutput() );
striper->Update();