]> Creatis software - clitk.git/blob - vv/vvToolROIManager.cxx
Add callbacks, now works.
[clitk.git] / vv / vvToolROIManager.cxx
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to:
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17   ===========================================================================**/
18
19 // vv
20 #include "vvToolROIManager.h"
21 #include "vvImageReader.h"
22 #include "vvROIActor.h"
23 #include "vvSlicer.h"
24 #include "vvROIActor.h"
25
26 // Qt
27 #include <QFileDialog>
28 #include <QMessageBox>
29 #include <QColorDialog>
30 #include <QAbstractEventDispatcher>
31  
32 // vtk
33 #include <vtkLookupTable.h>
34 #include <vtkRenderWindow.h>
35
36 //------------------------------------------------------------------------------
37 // Create the tool and automagically (I like this word) insert it in
38 // the main window menu.
39 ADD_TOOL(vvToolROIManager);
40 //------------------------------------------------------------------------------
41
42 //------------------------------------------------------------------------------
43 vvToolROIManager::vvToolROIManager(vvMainWindowBase * parent, Qt::WindowFlags f):
44   // vvToolWidgetBase(parent, f), 
45   // if Qt::Widget -> No dialog in this case (in tab) ; PB = "invisible widget on menu" !
46   // if "f" normal widget
47   QWidget(parent->GetTab()->widget(4)), 
48   vvToolBase<vvToolROIManager>(parent),
49   Ui::vvToolROIManager()
50 {
51   //  Insert the current QWidget into the tab layout (required)
52   QWidget * mother = qFindChild<QWidget*>(parent->GetTab(), "ROItab");
53   mother->layout()->addWidget(this);
54   mMainWindow = parent;
55   
56   // Build the UI
57   Ui_vvToolROIManager::setupUi(this);
58   setAttribute(Qt::WA_DeleteOnClose);
59   mTree->clear();
60   mTree->header()->resizeSection(0, 30);
61   parent->GetTab()->setCurrentIndex(2);
62
63   // Set default LUT
64   mDefaultLUTColor = vtkSmartPointer<vtkLookupTable>::New();
65   DD(mDefaultLUTColor->GetNumberOfTableValues());
66   for(int i=0; i<mDefaultLUTColor->GetNumberOfTableValues(); i++) {
67     double r = (rand()/(RAND_MAX+1.0));
68     double v = (rand()/(RAND_MAX+1.0));
69     double b = (rand()/(RAND_MAX+1.0));
70     mDefaultLUTColor->SetTableValue(i, r, v, b);
71     //    std::cout << "mDefaultLUTColor->SetTableValue(" << i << ", " << r << ", " << v << ", " << b << ");" << std::endl;
72   }
73 #include "vvDefaultLut.h"
74
75   // Initialization
76   mNumberOfVisibleROI = 0;
77   mNumberOfVisibleContourROI = 0;
78
79   // Select the current image as the target
80   int i = parent->GetSlicerManagerCurrentIndex();
81   InputIsSelected(parent->GetSlicerManagers()[i]);
82
83   // Connect event from mainwindow to this widget
84   connect(parent, SIGNAL(AnImageIsBeingClosed(vvSlicerManager *)), 
85           this, SLOT(AnImageIsBeingClosed(vvSlicerManager *)));
86   connect(parent, SIGNAL(SelectedImageHasChanged(vvSlicerManager *)), 
87           this, SLOT(SelectedImageHasChanged(vvSlicerManager *)));
88   connect(mOpenBinaryButton, SIGNAL(clicked()), this, SLOT(OpenBinaryImage()));
89   connect(mTree, SIGNAL(itemSelectionChanged()), this, SLOT(SelectedItemChangedInTree()));
90   connect(mCheckBoxShow, SIGNAL(toggled(bool)), this, SLOT(VisibleROIToggled(bool)));
91   connect(mOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(OpacityChanged(int)));
92   connect(mChangeColorButton, SIGNAL(clicked()), this, SLOT(ChangeColor()));
93   connect(mContourCheckBoxShow, SIGNAL(toggled(bool)), this, SLOT(VisibleContourROIToggled(bool)));  
94   connect(mChangeContourColorButton, SIGNAL(clicked()), this, SLOT(ChangeContourColor()));
95   connect(mContourWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(ChangeContourWidth(int)));
96   connect(mDepthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(ChangeDepth(int)));
97   connect(mReloadButton, SIGNAL(clicked()), this, SLOT(ReloadCurrentROI()));
98   connect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int)));
99   connect(mContourCheckBoxShowAll, SIGNAL(toggled(bool)), this, SLOT(AllVisibleContourROIToggled(bool)));
100
101   // mMainWindowBase->GetTab()->setTabIcon(mTabNumber, GetToolIcon());
102 }
103 //------------------------------------------------------------------------------
104
105
106 //------------------------------------------------------------------------------
107 vvToolROIManager::~vvToolROIManager()
108 {
109   std::cout << "vvToolROIManager::~vvToolROIManager()" << std::endl;
110 }
111 //------------------------------------------------------------------------------
112
113
114 //------------------------------------------------------------------------------
115 // STATIC
116 void vvToolROIManager::Initialize() {
117   SetToolName("ROIManager");
118   SetToolMenuName("Display ROI (binary image)");
119   SetToolIconFilename(":/common/icons/tool-roi.png");
120   SetToolTip("Display ROI from a binary image.");
121   SetToolExperimental(true);
122 }
123 //------------------------------------------------------------------------------
124
125
126 //------------------------------------------------------------------------------
127 void vvToolROIManager::InputIsSelected(vvSlicerManager *m)
128 {
129   std::cout << "vvToolROIManager::InputIsSelected()" << std::endl;
130   mSlicerManager = m;
131
132   // Signal/slot
133   connect(mCloseButton, SIGNAL(clicked()), this, SLOT(close()));
134
135   // Initialization
136   mSlicerManager = m;
137   mCurrentImage = mSlicerManager->GetImage();
138
139   // Refuse if 4D
140   if (mCurrentImage->GetNumberOfDimensions() != 3) {
141     QMessageBox::information(this,tr("Sorry only 3D yet"), tr("Sorry only 3D yet"));
142     close();
143     return;
144   }
145
146   // Auto diusplay browser to select new contours 
147   OpenBinaryImage();
148 }
149 //------------------------------------------------------------------------------
150
151
152 //------------------------------------------------------------------------------
153 void vvToolROIManager::AnImageIsBeingClosed(vvSlicerManager * m)
154 {
155   if (m == mSlicerManager) close();
156 }
157 //------------------------------------------------------------------------------
158
159
160 //------------------------------------------------------------------------------
161 void vvToolROIManager::SelectedImageHasChanged(vvSlicerManager * m) {
162   if (m != mSlicerManager) hide();
163   else show();
164 }
165 //------------------------------------------------------------------------------
166
167
168 //------------------------------------------------------------------------------
169 void vvToolROIManager::OpenBinaryImage() 
170 {
171   // Open images
172   QString Extensions = "Images files ( *.mha *.mhd *.hdr *.his)";
173   Extensions += ";;All Files (*)";
174   QStringList filename =
175     QFileDialog::getOpenFileNames(this,tr("Open binary image"),
176                                   mMainWindowBase->GetInputPathName(),Extensions);
177   if (filename.size() == 0) return;
178   
179   // For each selected file, open the image
180   for(int i=0; i<filename.size(); i++) {
181     // Open Image
182     QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
183     vvImageReader::Pointer reader = vvImageReader::New();
184     std::vector<std::string> filenames;
185     filenames.push_back(filename[i].toStdString());
186     reader->SetInputFilenames(filenames);
187     reader->Update(vvImageReader::IMAGE);
188     QApplication::restoreOverrideCursor();
189
190     if (reader->GetLastError().size() != 0) {
191       std::cerr << "Error while reading " << filename[i].toStdString() << std::endl;
192       QString error = "Cannot open file \n";
193       error += reader->GetLastError().c_str();
194       QMessageBox::information(this,tr("Reading problem"),error);
195       return;
196     }
197     vvImage::Pointer binaryImage = reader->GetOutput();
198     AddImage(binaryImage, filename[i].toStdString(), mBackgroundValueSpinBox->value(),
199              (!mBGModeCheckBox->isChecked()));
200     mOpenedBinaryImage.push_back(binaryImage);
201   }
202
203   // Update the contours
204   UpdateAllContours(); 
205 }
206 //------------------------------------------------------------------------------
207
208
209 //------------------------------------------------------------------------------
210 void vvToolROIManager::AddImage(vvImage * binaryImage, std::string filename, 
211                                 double BG, bool modeBG) 
212 {
213   DD(modeBG);
214
215   // Check Dimension
216   int dim = mCurrentImage->GetNumberOfDimensions();
217   int bin_dim = binaryImage->GetNumberOfDimensions();
218   if (dim < bin_dim) {
219     std::ostringstream os;
220     os << "Error. Loaded binary image is " << bin_dim
221        << "D while selected image is " << dim << "D" << std::endl;
222     QMessageBox::information(this,tr("Reading problem"),os.str().c_str());
223     return;
224   }
225   
226   // Compute roi index
227   int n = mROIList.size();
228   DD(n);
229   
230   // Compute the name of the new ROI
231   std::ostringstream oss;
232   oss << vtksys::SystemTools::GetFilenameName(vtksys::SystemTools::GetFilenameWithoutLastExtension(filename));
233   std::string name = oss.str();
234   DD(name);
235   
236   // Set color
237   std::vector<double> color;
238   color.push_back(1);
239   color.push_back(0);
240   color.push_back(0);
241
242   // Create ROI
243   clitk::DicomRT_ROI::Pointer roi = clitk::DicomRT_ROI::New();
244   roi->SetFromBinaryImage(binaryImage, n, name, color, filename);
245
246   // Add a new roi to the list
247   mROIList.push_back(roi);
248  
249   // Set BG or FG mode
250   if (modeBG) 
251     roi->SetBackgroundValueLabelImage(BG);
252   else 
253     roi->SetForegroundValueLabelImage(BG);
254   
255   // Change color
256   DD("color");
257   if (n<mDefaultLUTColor->GetNumberOfTableValues ()) {
258     double * color = mDefaultLUTColor->GetTableValue(n % mDefaultLUTColor->GetNumberOfTableValues ());
259     roi->SetDisplayColor(color[0], color[1], color[2]);
260   }
261   
262   // Add a new roi actor
263   QSharedPointer<vvROIActor> actor = QSharedPointer<vvROIActor>(new vvROIActor);
264   actor->SetBGMode(modeBG);
265   actor->SetROI(roi);
266   actor->SetSlicerManager(mSlicerManager);
267   actor->Initialize(n+1); // depth is n+1 to start at 1
268   mROIActorsList.push_back(actor);
269   
270   // CheckBox for "All"
271   if (actor->IsVisible()) mNumberOfVisibleROI++;
272   if (actor->IsContourVisible()) mNumberOfVisibleContourROI++;
273   
274   // Add ROI in tree
275   mTreeWidgetList.push_back(QSharedPointer<QTreeWidgetItem>(new QTreeWidgetItem(mTree)));
276   QTreeWidgetItem * w = mTreeWidgetList.back().data();
277   w->setText(0, QString("%1").arg(roi->GetROINumber()));
278   w->setText(1, QString("%1").arg(roi->GetName().c_str()));
279   w->setText(3, QString("%1").arg(actor->GetDepth()));  
280   QBrush brush(QColor(roi->GetDisplayColor()[0]*255, 
281                       roi->GetDisplayColor()[1]*255, 
282                       roi->GetDisplayColor()[2]*255));
283   brush.setStyle(Qt::SolidPattern);
284   w->setBackground(2, brush);
285   mMapROIToTreeWidget[roi] = w;
286   mMapTreeWidgetToROI[w] = roi;
287   mTree->resizeColumnToContents(0);
288   mTree->resizeColumnToContents(1);
289
290   // Update 
291   UpdateAllROIStatus(); 
292 }
293 //------------------------------------------------------------------------------
294
295
296 //------------------------------------------------------------------------------
297 void vvToolROIManager::UpdateAllContours() 
298 {
299   // Render loaded ROIs (the first is sufficient)
300   for(unsigned int i=0; i<mROIList.size(); i++) {
301     mROIActorsList[i]->Update();
302   }
303   for(int i=0; i<mSlicerManager->GetNumberOfSlicers(); i++) {
304     mSlicerManager->GetSlicer(i)->Render();
305   }  
306 }
307 //------------------------------------------------------------------------------
308
309
310 //------------------------------------------------------------------------------
311 void vvToolROIManager::UpdateAllROIStatus() {
312   int nbVisible = 0;
313   int nb = mROIList.size();
314   for(int i=0; i<nb; i++) {
315     if (mROIActorsList[i]->IsVisible()) {
316       nbVisible++;
317     }
318   }
319   DD(nbVisible);
320
321   // change the states
322   disconnect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int)));  
323   disconnect(mContourCheckBoxShowAll, SIGNAL(toggled(bool)), this, SLOT(AllVisibleContourROIToggled(bool)));
324   if (nbVisible == nb) mCheckBoxShowAll->setCheckState(Qt::Checked);
325   else {
326     if (nbVisible == 0) mCheckBoxShowAll->setCheckState(Qt::Unchecked);
327     else mCheckBoxShowAll->setCheckState(Qt::PartiallyChecked);
328   }
329   connect(mContourCheckBoxShowAll, SIGNAL(toggled(bool)), this, SLOT(AllVisibleContourROIToggled(bool)));
330   connect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int)));
331 }
332 //------------------------------------------------------------------------------
333
334
335 //------------------------------------------------------------------------------
336 void vvToolROIManager::SelectedItemChangedInTree() {
337   
338   // Search which roi is selected
339   QList<QTreeWidgetItem *> l = mTree->selectedItems();
340   if (l.size() == 0) {
341     //    mCurrentROIActor = 0;
342     mCurrentROI = NULL;
343     mGroupBoxROI->setEnabled(false);
344     return;
345   }
346   QTreeWidgetItem * w = l[0];
347   //std::cout << "selected item -> " << w->text(1).toStdString() << std::endl;
348   //std::cout << "m_NumberOfTool -> " << m_NumberOfTool << std::endl;
349   if (mMapTreeWidgetToROI.find(w) == mMapTreeWidgetToROI.end()) {
350     //    mCurrentROIActor = 0;
351     mCurrentROI = NULL;
352     mGroupBoxROI->setEnabled(false);
353     return;
354   }
355   clitk::DicomRT_ROI * roi = mMapTreeWidgetToROI[w];
356   // Get selected roi actor
357   QSharedPointer<vvROIActor> actor = mROIActorsList[roi->GetROINumber()];
358   mCurrentROI = roi;
359   mCurrentROIActor = actor;
360
361   // Warning -> avoid unuseful Render here by disconnect slider 
362   // Update GUI
363   disconnect(mTree, SIGNAL(itemSelectionChanged()), this, SLOT(SelectedItemChangedInTree()));
364   disconnect(mCheckBoxShow, SIGNAL(toggled(bool)), this, SLOT(VisibleROIToggled(bool)));
365   disconnect(mOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(OpacityChanged(int)));
366   disconnect(mChangeColorButton, SIGNAL(clicked()), this, SLOT(ChangeColor()));
367   disconnect(mContourCheckBoxShow, SIGNAL(toggled(bool)), this, SLOT(VisibleContourROIToggled(bool)));  
368   disconnect(mChangeContourColorButton, SIGNAL(clicked()), this, SLOT(ChangeContourColor()));
369   disconnect(mContourWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(ChangeContourWidth(int)));
370   disconnect(mDepthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(ChangeDepth(int)));
371
372   mGroupBoxROI->setEnabled(true);
373   mROInameLabel->setText(roi->GetName().c_str());
374   mCheckBoxShow->setChecked(actor->IsVisible());
375   mContourCheckBoxShow->setChecked(actor->IsContourVisible());
376   mContourWidthSpinBox->setValue(actor->GetContourWidth());
377   mDepthSpinBox->setValue(actor->GetDepth());
378   w->setText(3, QString("%1").arg(actor->GetDepth()));
379   mOpacitySlider->setValue((int)lrint(actor->GetOpacity()*100));
380   mOpacitySpinBox->setValue((int)lrint(actor->GetOpacity()*100));
381
382   connect(mTree, SIGNAL(itemSelectionChanged()), this, SLOT(SelectedItemChangedInTree()));
383   connect(mCheckBoxShow, SIGNAL(toggled(bool)), this, SLOT(VisibleROIToggled(bool)));
384   connect(mOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(OpacityChanged(int)));
385   connect(mChangeColorButton, SIGNAL(clicked()), this, SLOT(ChangeColor()));
386   connect(mContourCheckBoxShow, SIGNAL(toggled(bool)), this, SLOT(VisibleContourROIToggled(bool)));  
387   connect(mChangeContourColorButton, SIGNAL(clicked()), this, SLOT(ChangeContourColor()));
388   connect(mContourWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(ChangeContourWidth(int)));
389   connect(mDepthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(ChangeDepth(int)));
390
391   // is this needed ?
392   //  actor->Update(); 
393   // Final rendering
394   // mCurrentSlicerManager->Render();
395 }
396 //------------------------------------------------------------------------------
397
398
399 //------------------------------------------------------------------------------
400 void vvToolROIManager::VisibleROIToggled(bool b) {
401   if (mCurrentROIActor == NULL) return;
402   if (b == mCurrentROIActor->IsVisible()) return; // nothing to do
403   mCurrentROIActor->SetVisible(b);
404   UpdateAllROIStatus();
405   mSlicerManager->Render(); 
406 }
407 //------------------------------------------------------------------------------
408
409
410 //------------------------------------------------------------------------------
411 void vvToolROIManager::VisibleContourROIToggled(bool b) {
412   if (mCurrentROIActor == NULL) return;
413   if (mCurrentROIActor->IsContourVisible() == b) return; // nothing to do
414   mCurrentROIActor->SetContourVisible(b);
415   mCurrentROIActor->UpdateColor();
416   mSlicerManager->Render(); 
417 }
418 //------------------------------------------------------------------------------
419
420
421 //------------------------------------------------------------------------------
422 void vvToolROIManager::OpacityChanged(int v) {
423   if (mCurrentROIActor == NULL) return;
424   mCurrentROIActor->SetOpacity((double)v/100.0);
425   mCurrentROIActor->UpdateColor();
426   mSlicerManager->Render(); 
427 }
428 //------------------------------------------------------------------------------
429
430
431 //------------------------------------------------------------------------------
432 void vvToolROIManager::AllVisibleROIToggled(int b) {
433   bool status = false;
434   if ((mCheckBoxShowAll->checkState() == Qt::Checked) ||
435       (mCheckBoxShowAll->checkState() == Qt::PartiallyChecked))  status = true;
436
437   for(uint i=0; i<mROIList.size(); i++) {
438     mROIActorsList[i]->SetVisible(status);
439   }
440   if (status) mCheckBoxShowAll->setCheckState(Qt::Checked);
441   else  mCheckBoxShowAll->setCheckState(Qt::Unchecked);
442   mCheckBoxShow->setChecked(status);
443   mSlicerManager->Render(); 
444 }
445 //------------------------------------------------------------------------------
446
447
448 //------------------------------------------------------------------------------
449 void vvToolROIManager::AllVisibleContourROIToggled(bool b) {
450   bool status = false;
451   if ((mContourCheckBoxShowAll->checkState() == Qt::Checked) ||
452       (mContourCheckBoxShowAll->checkState() == Qt::PartiallyChecked))  status = true;
453   // Update current 
454   for(uint i=0; i<mROIActorsList.size(); i++) {
455     mROIActorsList[i]->SetContourVisible(status);
456   }
457   // Update current selection
458   if (status) mContourCheckBoxShowAll->setCheckState(Qt::Checked);
459   else  mContourCheckBoxShowAll->setCheckState(Qt::Unchecked);
460   mContourCheckBoxShow->setChecked(status);
461   mSlicerManager->Render(); 
462 }
463 //------------------------------------------------------------------------------
464
465
466 //------------------------------------------------------------------------------
467 void vvToolROIManager::ChangeColor() {
468   QColor color;
469   color.setRgbF(mCurrentROIActor->GetROI()->GetDisplayColor()[0],
470                 mCurrentROIActor->GetROI()->GetDisplayColor()[1],
471                 mCurrentROIActor->GetROI()->GetDisplayColor()[2]);
472   QColor c = QColorDialog::getColor(color, this, "Choose the ROI color");
473   mCurrentROIActor->GetROI()->SetDisplayColor(c.redF(), c.greenF(), c.blueF());
474   mCurrentROIActor->UpdateColor();
475
476   QTreeWidgetItem * w = mMapROIToTreeWidget[mCurrentROI];
477   QBrush brush(QColor(mCurrentROI->GetDisplayColor()[0]*255,
478                       mCurrentROI->GetDisplayColor()[1]*255,
479                       mCurrentROI->GetDisplayColor()[2]*255));
480   brush.setStyle(Qt::SolidPattern);
481   w->setBackground(2, brush);
482   // Render
483   mSlicerManager->Render();
484 }
485 //------------------------------------------------------------------------------
486
487
488 //------------------------------------------------------------------------------
489 void vvToolROIManager::ChangeContourColor() {
490   QColor color;
491   color.setRgbF(mCurrentROIActor->GetContourColor()[0], 
492                 mCurrentROIActor->GetContourColor()[1], 
493                 mCurrentROIActor->GetContourColor()[2]);
494   QColor c = QColorDialog::getColor(color, this, "Choose the contour color");
495   mCurrentROIActor->SetContourColor(c.redF(), c.greenF(), c.blueF());
496   mCurrentROIActor->UpdateColor();
497   mSlicerManager->Render();
498 }
499 //------------------------------------------------------------------------------
500
501
502 //------------------------------------------------------------------------------
503 void vvToolROIManager::ChangeContourWidth(int n) {
504   mCurrentROIActor->SetContourWidth(n);
505   mCurrentROIActor->UpdateColor();
506   mSlicerManager->Render();
507 }
508 //------------------------------------------------------------------------------
509
510
511 //------------------------------------------------------------------------------
512 void vvToolROIManager::ChangeDepth(int n) {
513   mCurrentROIActor->SetDepth(n);
514   mCurrentROIActor->UpdateImage();
515   mSlicerManager->Render();
516   QList<QTreeWidgetItem *> l = mTree->selectedItems();
517   QTreeWidgetItem * w = l[0];
518   w->setText(3, QString("%1").arg(mCurrentROIActor->GetDepth()));
519 }
520 //------------------------------------------------------------------------------
521
522
523 //------------------------------------------------------------------------------
524 void vvToolROIManager::ReloadCurrentROI() {
525   // Reload image
526   vvImageReader::Pointer reader = vvImageReader::New();
527   reader->SetInputFilename(mCurrentROI->GetFilename());
528   reader->Update(vvImageReader::IMAGE);
529   if (reader->GetLastError() != "") {
530     QMessageBox::information(mMainWindowBase, tr("Sorry, error. Could not reload"), 
531                              reader->GetLastError().c_str());
532     return;
533   }
534   mCurrentROI->GetImage()->GetFirstVTKImageData()->ReleaseData();
535   mCurrentROI->SetImage(reader->GetOutput());
536   
537   // Update visu"
538   mCurrentROIActor->UpdateImage();
539   mSlicerManager->Render();    
540 }
541 //------------------------------------------------------------------------------
542
543