]> Creatis software - bbtk.git/blobdiff - packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
#2969 BBTK Bug New Normal - MesureLength box in vtk package
[bbtk.git] / packages / gdcmvtk / src / bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
index 550148b057ad8affa7f220bfa146ec2aa8611d42..197ed037997da829b0de5672b6af03575e0bc767 100644 (file)
@@ -80,9 +80,17 @@ vtkImageData* GetXCoherentInfoGdcmReader::CreateDefaultImage()
 #if defined USE_GDCM
 void GetXCoherentInfoGdcmReader::Process()
 {
+
  // Read the *first* image file (a SET of file names is given as input) 
    f = GDCM_NAME_SPACE::File::New();
-   f->SetFileName( bbGetInputIn()[0] );
+
+       if ( bbGetInputIn().size()!=0 )
+       {
+               f->SetFileName( bbGetInputIn()[0] );
+       } else {
+               f->SetFileName( "" );
+       }
+   
    bool res = f->Load();  
    if ( !res )
    {
@@ -120,6 +128,7 @@ void GetXCoherentInfoGdcmReader::Process()
       sh->AddFileName(*it);
    }
 
+
    GDCM_NAME_SPACE::FileList::const_iterator it;
    GDCM_NAME_SPACE::FileList *l;
 
@@ -154,8 +163,6 @@ void GetXCoherentInfoGdcmReader::Process()
    //reader->SetFileName( bbGetInputIn().c_str() );
    reader->SetCoherentFileList(l);
    reader->Update();
-   reader->GetOutput();
-
    bbSetOutputOut( reader->GetOutput() );
 }
 #endif