if (!n_image_loaded) load_image_first_error();
window.AddROI(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]);
+ i++; //skip fusion name
+ }
else if (current == "--sequence") {
n_image_loaded++; //count only one for the sequence
parse_mode=P_SEQUENCE; }
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
-void vvMainWindow::AddFusionImage()
+void vvMainWindow::AddFusionImage(int index, QString file)
{
- int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+ if (index==-1)
+ index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
//check if one fusion image is added
for (int child = 0; child < DataTree->topLevelItem(index)->childCount(); child++)
QString Extensions = EXTENSIONS;
Extensions += ";;All Files (*)";
- QString file = QFileDialog::getOpenFileName(this,tr("Load Fusion image"),mInputPathName,Extensions);
+ if(file.isEmpty())
+ file = QFileDialog::getOpenFileName(this,tr("Load Fusion image"),mInputPathName,Extensions);
if (!file.isEmpty()) {
mInputPathName = itksys::SystemTools::GetFilenamePath(file.toStdString()).c_str();
itk::ImageIOBase::Pointer reader = itk::ImageIOFactory::CreateImageIO(
vvSlicerManager * AddImage(vvImage::Pointer image,std::string filename);
void AddField(QString file,int index);
void AddOverlayImage(int index, QString filename);
+ void AddFusionImage(int index=-1, QString filename="");
void AddROI(int index, QString filename);
///Adds a mesh to a SlicerManager, with optional warping by vector field
void AddContour(int image_index, vvMesh::Pointer contour, bool propagation);
void ReloadImage();
void OpenField();
void SelectOverlayImage();
- void AddFusionImage();
void SetVFProperty(int subsampling,int scale,int lut, int width);
void SetOverlayProperty(int color);