<string>Cold</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>Dosimetry</string>
+ </property>
+ </item>
<item>
<property name="text">
<string>Full Color</string>
<number>2</number>
</property>
<item row="0" column="0">
- <widget class="QVTKWidget" name="NOViewWidget" native="true">
+ <widget class="QVTKWidget" name="NOViewWidget">
<property name="mouseTracking">
<bool>true</bool>
</property>
<number>2</number>
</property>
<item row="0" column="0">
- <widget class="QVTKWidget" name="SOViewWidget" native="true">
+ <widget class="QVTKWidget" name="SOViewWidget">
<property name="mouseTracking">
<bool>true</bool>
</property>
<number>2</number>
</property>
<item row="0" column="0">
- <widget class="QVTKWidget" name="NEViewWidget" native="true">
+ <widget class="QVTKWidget" name="NEViewWidget">
<property name="mouseTracking">
<bool>true</bool>
</property>
<number>2</number>
</property>
<item row="0" column="0">
- <widget class="QVTKWidget" name="SEViewWidget" native="true">
+ <widget class="QVTKWidget" name="SEViewWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
overlayPanel->getOverlayName(mSlicerManagers[index]->GetOverlayName().c_str());
overlayPanel->getOverlayProperty(-1);
}
+
if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
overlayPanel->getFusionName(mSlicerManagers[index]->GetFusionName().c_str());
overlayPanel->getFusionProperty(mSlicerManagers[index]->GetFusionOpacity(),
{
int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
+ mSlicerManagers[index]->SetFusionColorMap(colormap);
mSlicerManagers[index]->SetFusionOpacity(opacity);
mSlicerManagers[index]->SetFusionThresholdOpacity(thresOpacity);
- mSlicerManagers[index]->SetFusionColorMap(colormap);
mSlicerManagers[index]->SetFusionWindow(window);
mSlicerManagers[index]->SetFusionLevel(level);
mSlicerManagers[index]->SetColorMap(0);
connect(fusionColorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(setFusionProperty()));
connect(windowSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty()));
connect(levelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty()));
+
+ disableFusionSignals = false;
}
void vvOverlayPanel::getCurrentImageName(QString name)
void vvOverlayPanel::getFusionProperty(int opacity, int thresOpacity, int colormap, double window, double level)
{
if (opacity > -1) {
+ //first disable signals generated by each setValue() call
+ disableFusionSignals = true;
fusionFrame->show();
fusionFrame->setEnabled(1);
+ fusionColorMapComboBox->setEnabled(1);
+ fusionColorMapComboBox->setCurrentIndex(colormap);
opacityHorizontalSlider->setEnabled(1);
opacityHorizontalSlider->setValue(opacity);
thresOpacityHorizontalSlider->setEnabled(1);
thresOpacityHorizontalSlider->setValue(thresOpacity);
- fusionColorMapComboBox->setEnabled(1);
- fusionColorMapComboBox->setCurrentIndex(colormap);
windowSpinBox->setEnabled(1);
levelSpinBox->setEnabled(1);
windowSpinBox->setValue(window);
levelSpinBox->setValue(level);
+
+ // re-enable signals and trigger slot function
+ disableFusionSignals = false;
+ setFusionProperty();
} else {
fusionFrame->hide();
fusionFrame->setEnabled(0);
void vvOverlayPanel::setFusionProperty()
{
+ if (disableFusionSignals)
+ return;
+
emit FusionPropertyUpdated(opacityHorizontalSlider->value(), thresOpacityHorizontalSlider->value(), fusionColorMapComboBox->currentIndex(),
windowSpinBox->value(), levelSpinBox->value());
}
void VFPropertyUpdated(int subsampling, int scale, int log, int width, double r, double g, double b);
void OverlayPropertyUpdated(int color);
void FusionPropertyUpdated(int opacity, int thresOpacity, int colormap, double window, double level);
+
+
+private:
+ bool disableFusionSignals;
+
}; // end class vvOverlayPanel
//====================================================================
LUT->SetHueRange(0.4,0.80);
break;
case 3:
+ if (LUT == NULL)
+ LUT = vtkLookupTable::New();
+ LUT->SetValueRange(0.5,1);
+ LUT->SetSaturationRange(1,1);
+ LUT->SetHueRange(0.666,0);
+ break;
+ case 4:
if (LUT == NULL)
LUT = vtkLookupTable::New();
LUT->SetValueRange(0,1);
LUT->Build();
}
vtkWindowLevelLookupTable* fusLUT = NULL;
- if (mSlicers[0]->GetFusion()) { // && mFusionColorMap != 0) {
+ if (mSlicers[0]->GetFusion()) { // && mFusionColorMap >= 0) {
fusLUT = vtkWindowLevelLookupTable::New();
double fusRange [2];
fusRange[0] = mFusionLevel - mFusionWindow/2;
}
else if (mFusionColorMap == 4)
fusLUT->SetHueRange(0,1);
- else if (mFusionColorMap == 0)
+ else if (mFusionColorMap <= 0)
{
fusLUT->SetValueRange(0,1);
fusLUT->SetSaturationRange(0,0);
fusLUT->ForceBuild();
- // set color table transparancy
+ // set color table transparency
double alpha_range_end = frange[0] + (double)mFusionThresOpacity*(frange[1] - frange[0])/100;
for (double i = frange[0]; i < alpha_range_end; i++) {
double v[4];
}
if (mSlicers[i]->GetFusion()) {
- mSlicers[i]->GetFusionActor()->SetOpacity(double(mFusionOpacity)/100);
mSlicers[i]->GetFusionMapper()->SetLookupTable(fusLUT);
+ mSlicers[i]->GetFusionActor()->SetOpacity(double(mFusionOpacity)/100);
}
}
if (fusLUT)