}
}
else if (current_index >= 0) {
- if (value == "Fusion")
+ vvSlicerManager* slicerManager = m_Window->GetSlicerManagers()[current_index];
+ if (value == "Preset") {
+ double vali = m_XmlReader->readElementText().toInt();
+ if (!m_XmlReader->hasError())
+ slicerManager->SetPreset(vali);
+ }
+ else if (value == "Window") {
+ double vald = m_XmlReader->readElementText().toDouble();
+ if (!m_XmlReader->hasError())
+ slicerManager->SetColorWindow(vald);
+ }
+ else if (value == "Level") {
+ double vald = m_XmlReader->readElementText().toDouble();
+ if (!m_XmlReader->hasError())
+ slicerManager->SetColorLevel(vald);
+ }
+ else if (value == "Fusion")
value = ReadFusion(current_index);
else if (value == "Overlay")
value = ReadOverlay(current_index);
const vvSlicerManager * slicerManager = m_Window->GetSlicerManagers()[index];
m_XmlWriter->writeStartElement("Image");
- std::ostringstream indexStr;
- indexStr.str("");
- indexStr << index;
- m_XmlWriter->writeAttribute("Index", indexStr.str().c_str());
+ std::ostringstream valueStr;
+ valueStr.str("");
+ valueStr << index;
+ m_XmlWriter->writeAttribute("Index", valueStr.str().c_str());
std::string filename = item->data(0, Qt::UserRole).toString().toStdString();
m_XmlWriter->writeTextElement("FileName", QDir::current().absoluteFilePath(filename.c_str()));
-
+ int preset = slicerManager->GetPreset();
+ m_XmlWriter->writeTextElement("Preset", QString::number(preset));
+ if (preset == 6) {
+ m_XmlWriter->writeTextElement("Window", QString::number(slicerManager->GetColorWindow()));
+ m_XmlWriter->writeTextElement("Level", QString::number(slicerManager->GetColorLevel()));
+ }
+
QTreeWidgetItem* item_child;
std::string role;
for (int i = 0; i < item->childCount(); i++) {
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
-double vvSlicerManager::GetColorWindow()
+double vvSlicerManager::GetColorWindow() const
{
if (mSlicers.size())
return mSlicers[0]->GetColorWindow();
//----------------------------------------------------------------------------
-double vvSlicerManager::GetColorLevel()
+double vvSlicerManager::GetColorLevel() const
{
if (mSlicers.size())
return mSlicers[0]->GetColorLevel();
mFusionShowLegend = show;
}
- double GetColorWindow();
- double GetColorLevel();
+ double GetColorWindow() const;
+ double GetColorLevel() const;
double GetOverlayColorWindow() const;
double GetOverlayColorLevel() const;
bool GetLinkOverlayWindowLevel() const;
int GetColorMap() {
return mColorMap;
}
- int GetPreset() {
+ int GetPreset() const {
return mPreset;
}
SlicingPresetType GetSlicingPreset() {