]> Creatis software - creaMaracasVisu.git/commitdiff
volume rendering qt with composite mip
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 29 Jun 2011 08:43:56 +0000 (08:43 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 29 Jun 2011 08:43:56 +0000 (08:43 +0000)
lib/GUI/Base/VolumeRenderer/volumerendererdata.cxx
lib/GUI/Base/VolumeRenderer/volumerendererdata.h
lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.cxx
lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.h
lib/GUI/Qt/VolumeRenderer/qtvolumerendererpanel.ui
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h

index 3e3cf88de08382ee11f644d0328ec965956a83cc..e0b2af6a8a8c4209110d8da610a437ffac3f9acf 100644 (file)
@@ -50,3 +50,9 @@ void  VolumeRendererData::BoundingBoxChanged(bool checked){
         }
     }
 }
+
+void VolumeRendererData::changeCompositeMIPFunction(int function){
+    invariant();
+    if(VolRendData)
+        VolRendData->changeCompositeMIPFunction(function);
+}
index f91f7ac62ae549432ac7e8322f97ce9fb98c5aa8..a6a76a7e35eea3fbca2ad38a9b016789268b68c0 100644 (file)
@@ -29,6 +29,7 @@ protected:
     void ShowVolume(bool enable);
     void OpacityChanged(vector<double> greyvalues, vector<double> values);
     void BoundingBoxChanged(bool checked);
+    void changeCompositeMIPFunction(int function);
 
 private:
 
index 0ba1f775278056ec4066634257a8bf62da773f67..f0a431d596f643a63626a2ff271ed5d892e4850f 100644 (file)
@@ -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);
+    }
+}
index a2bee943123b38033ff89b13b59049d238ca1398..22750e7be3a8a180cec0ea23ced628e8c93a98cd 100644 (file)
@@ -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();
index 83220b1c44a34e3e99e53f05eb10a910671d9f0e..de487459c2ff4d8db23052ade23af89b6f96d0f8 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>147</width>
-    <height>107</height>
+    <width>186</width>
+    <height>137</height>
    </rect>
   </property>
   <property name="windowTitle">
     </layout>
    </item>
    <item>
-    <layout class="QFormLayout" name="formLayout">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QRadioButton" name="radioButtonComposite">
+       <property name="text">
+        <string>Composite</string>
+       </property>
+       <property name="checked">
+        <bool>true</bool>
+       </property>
+       <attribute name="buttonGroup">
+        <string>buttonGroup</string>
+       </attribute>
+      </widget>
+     </item>
+     <item>
+      <widget class="QRadioButton" name="radioButtonMIP">
+       <property name="text">
+        <string>MIP </string>
+       </property>
+       <property name="checked">
+        <bool>false</bool>
+       </property>
+       <attribute name="buttonGroup">
+        <string>buttonGroup</string>
+       </attribute>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QGridLayout" name="gridLayout">
      <item row="0" column="0">
       <widget class="QLabel" name="label">
        <property name="text">
      <y>30</y>
     </hint>
     <hint type="destinationlabel">
-     <x>47</x>
-     <y>86</y>
+     <x>57</x>
+     <y>126</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>checkBoxShowVolume</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>radioButtonComposite</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>41</x>
+     <y>23</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>36</x>
+     <y>54</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>checkBoxShowVolume</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>radioButtonMIP</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>69</x>
+     <y>16</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>143</x>
+     <y>46</y>
     </hint>
    </hints>
   </connection>
  </connections>
+ <buttongroups>
+  <buttongroup name="buttonGroup">
+   <property name="exclusive">
+    <bool>true</bool>
+   </property>
+  </buttongroup>
+ </buttongroups>
 </ui>
index ba1706c63b4298bc12540cddf4954d2cbc70ff9a..d72471869f5ff6c9eb190052f845d031d85bd360 100644 (file)
@@ -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){
index 87b1b74569fff152840378249c86c4e432c6c5a8..ea1cd4a88d490a21c14774e07c94189f788542b5 100644 (file)
@@ -124,7 +124,7 @@ public:
                 return _ctfun;
         }
 
-        void changeCompositeMIPFunction(int function) throw (char *);
+        void changeCompositeMIPFunction(int function);
 
         void SetLookupTable(vtkLookupTable* lookuptable);