+ mCurrentROIActor->UpdateColor();
+ mCurrentSlicerManager->Render();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvToolStructureSetManager::AllVisibleROIToggled(int b) {
+ bool status = false;
+ if ((mCheckBoxShowAll->checkState() == Qt::Checked) ||
+ (mCheckBoxShowAll->checkState() == Qt::PartiallyChecked)) status = true;
+
+ for(int i=0; i<mCurrentStructureSetActor->GetNumberOfROIs(); i++) {
+ mCurrentStructureSetActor->GetROIList()[i]->SetVisible(status);
+ }
+ if (status) mCheckBoxShowAll->setCheckState(Qt::Checked);
+ else mCheckBoxShowAll->setCheckState(Qt::Unchecked);
+ mCheckBoxShow->setChecked(status);
+ mCurrentSlicerManager->Render();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvToolStructureSetManager::AllVisibleContourROIToggled(bool b) {
+ bool status = false;
+ if ((mContourCheckBoxShowAll->checkState() == Qt::Checked) ||
+ (mContourCheckBoxShowAll->checkState() == Qt::PartiallyChecked)) status = true;
+ // Update current
+ for(int i=0; i<mCurrentStructureSetActor->GetNumberOfROIs(); i++) {
+ mCurrentStructureSetActor->GetROIList()[i]->SetContourVisible(status);
+ }
+ // Update current selection
+ if (status) mContourCheckBoxShowAll->setCheckState(Qt::Checked);
+ else mContourCheckBoxShowAll->setCheckState(Qt::Unchecked);
+ mContourCheckBoxShow->setChecked(status);
+ mCurrentSlicerManager->Render();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvToolStructureSetManager::ChangeColor() {
+ QColor color;
+ color.setRgbF(mCurrentROIActor->GetROI()->GetDisplayColor()[0],
+ mCurrentROIActor->GetROI()->GetDisplayColor()[1],
+ mCurrentROIActor->GetROI()->GetDisplayColor()[2]);
+ QColor c = QColorDialog::getColor(color, this, "Choose the ROI color");
+ mCurrentROIActor->GetROI()->SetDisplayColor(c.redF(), c.greenF(), c.blueF());
+ mCurrentROIActor->UpdateColor();
+
+ QTreeWidgetItem * w = mMapROIToTreeWidget[mCurrentROI];
+ QBrush brush(QColor(mCurrentROI->GetDisplayColor()[0]*255,
+ mCurrentROI->GetDisplayColor()[1]*255,
+ mCurrentROI->GetDisplayColor()[2]*255));
+ brush.setStyle(Qt::SolidPattern);
+ w->setBackground(2, brush);
+ // Render
+ mCurrentSlicerManager->Render();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvToolStructureSetManager::ChangeContourColor() {
+ QColor color;
+ color.setRgbF(mCurrentROIActor->GetContourColor()[0],
+ mCurrentROIActor->GetContourColor()[1],
+ mCurrentROIActor->GetContourColor()[2]);
+ QColor c = QColorDialog::getColor(color, this, "Choose the contour color");
+ mCurrentROIActor->SetContourColor(c.redF(), c.greenF(), c.blueF());
+ mCurrentROIActor->UpdateColor();
+ mCurrentSlicerManager->Render();