</property>
</widget>
</item>
- <item row="3" column="2" colspan="2">
- <widget class="QComboBox" name="fusionColorMapComboBox">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <item>
- <property name="text">
- <string>B&W</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Heat</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Cold</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Dosimetry</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Full Color Range</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="4" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Window :</string>
</property>
</widget>
</item>
- <item row="4" column="1" colspan="2">
+ <item row="7" column="1" colspan="2">
<widget class="QDoubleSpinBox" name="fusionWindowSpinBox">
<property name="decimals">
<number>4</number>
</property>
</widget>
</item>
- <item row="4" column="3">
+ <item row="7" column="3">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Level :</string>
</property>
</widget>
</item>
- <item row="4" column="4" colspan="2">
+ <item row="7" column="4" colspan="2">
<widget class="QDoubleSpinBox" name="fusionLevelSpinBox">
<property name="decimals">
<number>4</number>
</property>
</widget>
</item>
- <item row="5" column="0" colspan="4">
+ <item row="8" column="0" colspan="4">
<widget class="QLabel" name="valueFusionnedLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
</property>
</widget>
</item>
+ <item row="3" column="2">
+ <widget class="QComboBox" name="fusionColorMapComboBox">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <item>
+ <property name="text">
+ <string>B&W</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Heat</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Cold</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Dosimetry</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Full Color Range</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="3" colspan="3">
+ <widget class="QCheckBox" name="fusionShowLegendCheckBox">
+ <property name="text">
+ <string>Show legend</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
connect(overlayPanel,SIGNAL(VFPropertyUpdated(int,int,int,int,double,double,double)),this,SLOT(SetVFProperty(int,int,int,int,double,double,double)));
connect(overlayPanel,SIGNAL(OverlayPropertyUpdated(int,int,double,double)),
this,SLOT(SetOverlayProperty(int,int,double,double)));
- connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,int,double,double)),
- this,SLOT(SetFusionProperty(int,int,int,double,double)));
+ connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,int,double,double, bool)),
+ this,SLOT(SetFusionProperty(int,int,int,double,double, bool)));
connect(landmarksPanel,SIGNAL(UpdateRenderWindows()),this,SLOT(UpdateRenderWindows()));
playMode = 0;//pause
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
-void vvMainWindow::SetFusionProperty(int opacity, int thresOpacity, int colormap,double window, double level)
+void vvMainWindow::SetFusionProperty(int opacity, int thresOpacity, int colormap,double window, double level, bool showLegend)
{
int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
mSlicerManagers[index]->SetFusionThresholdOpacity(thresOpacity);
mSlicerManagers[index]->SetFusionWindow(window);
mSlicerManagers[index]->SetFusionLevel(level);
+ mSlicerManagers[index]->SetFusionShowLegend(showLegend);
mSlicerManagers[index]->SetColorMap(0);
mSlicerManagers[index]->Render();
}
void SetVFProperty(int subsampling,int scale,int lut, int width, double r, double g, double b);
void SetOverlayProperty(int color, int linked, double window, double level);
- void SetFusionProperty(int opacity, int tresOpacity, int colormap,double window,double level);
+ void SetFusionProperty(int opacity, int tresOpacity, int colormap,double window,double level, bool showLegend);
void GoToCursor();
void PlayPause();
scaleSpinBox->setEnabled(0);
lutCheckBox->hide();
lutCheckBox->setEnabled(0);
+ fusionShowLegendCheckBox->setChecked(true);
+
connect(subSamplingSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty()));
connect(scaleSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty()));
connect(lutCheckBox,SIGNAL(clicked()),this,SLOT(setVFProperty()));
connect(fusionLevelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty()));
connect(fusionOpacitySpin,SIGNAL(valueChanged(double)),this,SLOT(setFusionSpinProperty()));
connect(fusionThresSpin,SIGNAL(valueChanged(double)),this,SLOT(setFusionSpinProperty()));
+ connect(fusionShowLegendCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setFusionProperty()));
connect(overlayWindowSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setOverlayProperty()));
connect(overlayLevelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setOverlayProperty()));
connect(overlayLinkCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setOverlayProperty()));
fusionThresSpin->setValue(thresOpacityHorizontalSlider->value());
emit FusionPropertyUpdated(opacityHorizontalSlider->value(), thresOpacityHorizontalSlider->value(), fusionColorMapComboBox->currentIndex(),
- fusionWindowSpinBox->value(), fusionLevelSpinBox->value());
+ fusionWindowSpinBox->value(), fusionLevelSpinBox->value(), fusionShowLegendCheckBox->isChecked());
}
void vvOverlayPanel::setFusionSpinProperty()
this->setVFProperty();
}
+
+
#endif /* end #define _vvOverlayPanel_CXX */
void getCurrentVectorInfo(int visibility, double x, double y, double z, double value);
void getCurrentOverlayInfo(int visibility,double valueOver, double valueRef);
void getCurrentFusionInfo(int visibility,double value);
+
+ bool getShowLegend();
public slots:
void setVFProperty();
signals:
void VFPropertyUpdated(int subsampling, int scale, int log, int width, double r, double g, double b);
void OverlayPropertyUpdated(int color, int linked, double window, double level);
- void FusionPropertyUpdated(int opacity, int thresOpacity, int colormap, double window, double level);
+ void FusionPropertyUpdated(int opacity, int thresOpacity, int colormap, double window, double level, bool showLegend);
private:
legend->SetVisibility(0);
legend->SetLabelFormat("%.1f");
this->GetRenderer()->AddActor(legend);
+ showFusionLegend = true;
this->WindowLevel->Delete();
this->WindowLevel = vvImageMapToWLColors::New();
//----------------------------------------------------------------------------
void vvSlicer::Render()
{
- if (this->mFusion) {
+ if (this->mFusion && showFusionLegend) {
legend->SetLookupTable(this->GetFusionMapper()->GetLookupTable());
legend->UseOpacityOn();
legend->SetVisibility(1);
vvImage::Pointer GetFusion() {
return mFusion;
}
+ void ShowFusionLegend(bool show) { showFusionLegend = show; }
/**Get/Set an actor's visibility ("overlay, fusion, vf, contour...")
Overlay index is the index of the overlay by type, eg. if there are
int * mReducedExtent;
int * mInitialExtent;
bool mLinkOverlayWindowLevel;
+ bool showFusionLegend;
private:
void UpdateOrientation();
mFusionColorMap = 3;
mFusionWindow = 1000;
mFusionLevel = 1000;
-
+ mFusionShowLegend = true;
+
mLandmarks = NULL;
mLinkedId.resize(0);
}
if (mSlicers[i]->GetFusion()) {
+ mSlicers[i]->ShowFusionLegend(mFusionShowLegend);
mSlicers[i]->GetFusionMapper()->SetLookupTable(fusLUT);
mSlicers[i]->GetFusionActor()->SetOpacity(double(mFusionOpacity)/100);
}
void SetFusionLevel(double level) {
mFusionLevel = level;
}
+ void SetFusionShowLegend(int show) {
+ mFusionShowLegend = show;
+ }
double GetColorWindow();
double GetColorLevel();
int mFusionColorMap;
double mFusionWindow;
double mFusionLevel;
+ bool mFusionShowLegend;
int mPreset;
vvImageReader::LoadedImageType mType;