From: Juan Prieto Date: Wed, 29 Jun 2011 08:43:56 +0000 (+0000) Subject: volume rendering qt with composite mip X-Git-Tag: v1.0.4~91 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=42e68172d460b71190e5d9811cffe7131e86eb72;p=creaMaracasVisu.git volume rendering qt with composite mip --- diff --git a/lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx b/lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx index 3e3cf88..e0b2af6 100644 --- a/lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx +++ b/lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx @@ -50,3 +50,9 @@ void VolumeRendererData::BoundingBoxChanged(bool checked){ } } } + +void VolumeRendererData::changeCompositeMIPFunction(int function){ + invariant(); + if(VolRendData) + VolRendData->changeCompositeMIPFunction(function); +} diff --git a/lib/GUI/Base/VolumeRenderer/volumerendererdata.h b/lib/GUI/Base/VolumeRenderer/volumerendererdata.h index f91f7ac..a6a76a7 100644 --- a/lib/GUI/Base/VolumeRenderer/volumerendererdata.h +++ b/lib/GUI/Base/VolumeRenderer/volumerendererdata.h @@ -29,6 +29,7 @@ protected: void ShowVolume(bool enable); void OpacityChanged(vector greyvalues, vector values); void BoundingBoxChanged(bool checked); + void changeCompositeMIPFunction(int function); private: diff --git a/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.cxx b/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.cxx index 0ba1f77..f0a431d 100644 --- a/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.cxx +++ b/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.cxx @@ -58,3 +58,17 @@ void QtVolumeRendererPanel::on_checkBoxBoundingBox_clicked(bool checked) QMessageBox::critical(this, tr("Volume Rendering"), tr(e), QMessageBox::Ok); } } + +void QtVolumeRendererPanel::on_radioButtonMIP_clicked(bool checked) +{ + if(checked){ + this->changeCompositeMIPFunction(1); + } +} + +void QtVolumeRendererPanel::on_radioButtonComposite_clicked(bool checked) +{ + if(checked){ + this->changeCompositeMIPFunction(0); + } +} diff --git a/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.h b/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.h index a2bee94..22750e7 100644 --- a/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.h +++ b/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.h @@ -24,6 +24,10 @@ private slots: void on_checkBoxBoundingBox_clicked(bool checked); + void on_radioButtonMIP_clicked(bool checked); + + void on_radioButtonComposite_clicked(bool checked); + private: Ui::QtVolumeRendererPanel *ui; void invariant(); diff --git a/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.ui b/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.ui index 83220b1..de48745 100644 --- a/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.ui +++ b/lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.ui @@ -6,8 +6,8 @@ 0 0 - 147 - 107 + 186 + 137 @@ -42,7 +42,37 @@ - + + + + + Composite + + + true + + + buttonGroup + + + + + + + MIP + + + false + + + buttonGroup + + + + + + + @@ -136,10 +166,49 @@ 30 - 47 - 86 + 57 + 126 + + + + + checkBoxShowVolume + toggled(bool) + radioButtonComposite + setEnabled(bool) + + + 41 + 23 + + + 36 + 54 + + + + + checkBoxShowVolume + toggled(bool) + radioButtonMIP + setEnabled(bool) + + + 69 + 16 + + + 143 + 46 + + + + true + + + diff --git a/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx b/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx index ba1706c..d724718 100644 --- a/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx +++ b/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx @@ -270,7 +270,7 @@ void VolumeRendererManagerData::setDataname(std::string dataname){ _dataname = dataname; } -void VolumeRendererManagerData::changeCompositeMIPFunction(int function) throw (char *){ +void VolumeRendererManagerData::changeCompositeMIPFunction(int function){ checkInvariant(); if(_volumeMapper){ if(function == 0){ diff --git a/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h b/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h index 87b1b74..ea1cd4a 100644 --- a/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h +++ b/lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h @@ -124,7 +124,7 @@ public: return _ctfun; } - void changeCompositeMIPFunction(int function) throw (char *); + void changeCompositeMIPFunction(int function); void SetLookupTable(vtkLookupTable* lookuptable);