Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- ======================================================================-====*/
+ ===========================================================================**/
// vv
#include "vvToolStructureSetManager.h"
if (mCurrentImage->GetNumberOfDimensions() != 3) {
QMessageBox::information(this,tr("Sorry only 3D yet"), tr("Sorry only 3D yet"));
close();
+ return;
}
// Hide selector
HideInputSelector(); // splitter
//------------------------------------------------------------------------------
void vvToolStructureSetManager::UpdateStructureSetInTreeWidget(int index, clitk::DicomRT_StructureSet * s) {
// Insert ROI
+ /*
const std::vector<clitk::DicomRT_ROI::Pointer> & rois = s->GetListOfROI();
for(unsigned int i=0; i<rois.size(); i++) {
if (mMapROIToTreeWidget.find(rois[i]) == mMapROIToTreeWidget.end())
AddRoiInTreeWidget(rois[i], mTree); // replace mTree with ss if several SS
}
+ */
+ clitk::DicomRT_StructureSet::ROIConstIteratorType iter;
+ for(iter = s->GetROIs().begin(); iter != s->GetROIs().end(); iter++) {
+ clitk::DicomRT_ROI::Pointer roi = iter->second;
+ if (mMapROIToTreeWidget.find(roi) == mMapROIToTreeWidget.end())
+ AddRoiInTreeWidget(roi, mTree); // replace mTree with ss if several SS
+ }
}
//------------------------------------------------------------------------------
mCurrentStructureSetActor = mStructureSetActorsList[index].data();
mCurrentStructureSetIndex = index;
// Open images
- QString Extensions = "Images files ( *.mhd *.hdr *.his)";
+ QString Extensions = "Images files ( *.mha *.mhd *.hdr *.his)";
Extensions += ";;All Files (*)";
QStringList filename =
QFileDialog::getOpenFileNames(this,tr("Open binary image"),
int n = mCurrentStructureSet->AddBinaryImageAsNewROI(binaryImage, filename);
mLoadedROIIndex.push_back(n);
if (m_modeBG)
- mCurrentStructureSet->GetROI(n)->SetBackgroundValueLabelImage(BG);
+ mCurrentStructureSet->GetROIFromROINumber(n)->SetBackgroundValueLabelImage(BG);
else
- mCurrentStructureSet->GetROI(n)->SetForegroundValueLabelImage(BG);
+ mCurrentStructureSet->GetROIFromROINumber(n)->SetForegroundValueLabelImage(BG);
// Change color
if (n<mDefaultLUTColor->GetNumberOfTableValues ()) {
double * color = mDefaultLUTColor->GetTableValue(n % mDefaultLUTColor->GetNumberOfTableValues ());
- mCurrentStructureSet->GetROI(n)->SetDisplayColor(color[0], color[1], color[2]);
+ mCurrentStructureSet->GetROIFromROINumber(n)->SetDisplayColor(color[0], color[1], color[2]);
}
// Add a new roi actor