X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=packages%2Fgdcmvtk%2Fsrc%2FbbgdcmvtkGetXCoherentInfoGdcmReader.cxx;h=197ed037997da829b0de5672b6af03575e0bc767;hb=6b2916fb6359ead51e50b3ee9b473dc1c3c057d4;hp=550148b057ad8affa7f220bfa146ec2aa8611d42;hpb=947acfe6b7e7f37d3523f9d5eabfeb9277292aad;p=bbtk.git diff --git a/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx b/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx index 550148b..197ed03 100644 --- a/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx +++ b/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx @@ -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