From: Romulo Pinho Date: Fri, 16 Dec 2011 10:55:00 +0000 (+0100) Subject: dicom structure in cmd line X-Git-Tag: v1.3.0~135 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=commitdiff_plain;h=3c2462eafabcf428b4d2775c414a7b5f62511d3f dicom structure in cmd line - --contour - in the same way as overlay/fusion/vf --- diff --git a/vv/vv.cxx b/vv/vv.cxx index 1fb357e..f3011e6 100644 --- a/vv/vv.cxx +++ b/vv/vv.cxx @@ -134,6 +134,10 @@ int main( int argc, char** argv ) if (!n_image_loaded) load_image_first_error(); window.AddROI(n_image_loaded-1,argv[i+1]); i++; //skip roi name + } else if (current=="--contour") { + if (!n_image_loaded) load_image_first_error(); + window.AddDCStructContour(n_image_loaded-1,argv[i+1]); + i++; //skip roi name } else if (current=="--fusion") { if (!n_image_loaded) load_image_first_error(); window.AddFusionImage(n_image_loaded-1,argv[i+1]); diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 5bdc978..b102e62 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -491,15 +491,8 @@ void vvMainWindow::OpenVTKContour() //------------------------------------------------------------------------------ -void vvMainWindow::OpenDCStructContour() +void vvMainWindow::AddDCStructContour(int index, QString file) { - if (mSlicerManagers.size() > 0) { - QString Extensions = "Dicom Files ( *.dcm RS*)"; - Extensions += ";;All Files (*)"; - QString file = QFileDialog::getOpenFileName(this,tr("Merge Images"),mInputPathName,Extensions); - if (file.isNull()) - return; - int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]); vvMeshReader reader; reader.SetFilename(file.toStdString()); vvStructSelector selector; @@ -519,6 +512,19 @@ void vvMainWindow::OpenDCStructContour() AddContour(index,*i,selector.PropagationEnabled()); QApplication::restoreOverrideCursor(); } +} + +//------------------------------------------------------------------------------ +void vvMainWindow::OpenDCStructContour() +{ + if (mSlicerManagers.size() > 0) { + QString Extensions = "Dicom Files ( *.dcm RS*)"; + Extensions += ";;All Files (*)"; + QString file = QFileDialog::getOpenFileName(this,tr("Merge Images"),mInputPathName,Extensions); + if (file.isNull()) + return; + int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]); + AddDCStructContour(index, file); } } //------------------------------------------------------------------------------ diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index 12aaaf1..23ee6f4 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -73,6 +73,7 @@ class vvMainWindow: public vvMainWindowBase, public slots: ///Allows the user to open and select various surfaces contained in a dicom-struct file + void AddDCStructContour(int index, QString file); void OpenDCStructContour(); ///Computes the midposition image of a 4D sequence with a VF and displays it void ComputeMidPosition();