]> Creatis software - bbtk.git/commitdiff
#3309 BBTK Bug New Normal - Bug gdcmvtk - GetXCoherentInfoGdcmReader std - FilesFro...
authorEduardo DAVILA <davila@ei-ed-606.univ-lyon1.fr>
Fri, 20 Sep 2019 11:19:38 +0000 (13:19 +0200)
committerEduardo DAVILA <davila@ei-ed-606.univ-lyon1.fr>
Fri, 20 Sep 2019 11:19:38 +0000 (13:19 +0200)
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
packages/std/src/bbstdFilesFromDirectory.cxx

index 39ff153e69dc68fc743921f10c94b4f4f0f2ba66..e553a6767bf18b87f86a6400daee1e241d3c3ae8 100644 (file)
@@ -87,7 +87,6 @@ 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();
 
@@ -97,7 +96,7 @@ void GetXCoherentInfoGdcmReader::Process()
        } else {
                f->SetFileName( "" );
        } // if
-   
+
    bool res = f->Load();  
    if ( !res )
    {
@@ -139,7 +138,6 @@ void GetXCoherentInfoGdcmReader::Process()
       sh->AddFileName(*it);
    } //for vector
 
-
    GDCM_NAME_SPACE::FileList::const_iterator it;
    GDCM_NAME_SPACE::FileList *l;
 
@@ -166,6 +164,7 @@ void GetXCoherentInfoGdcmReader::Process()
        int iTag,sizeDicomTagsVector=bbGetInputDicomTags().size();
        GDCM_NAME_SPACE::FileList::const_iterator iitt = l->begin();
        //iitt ++;
+
        for ( ; iitt != l->end(); ++iitt)
        {
                MapInfoDicom mapinfodicom;
@@ -198,7 +197,6 @@ void GetXCoherentInfoGdcmReader::Process()
    reader->SetCoherentFileList(l);
    reader->Update();
    reader->GetOutput();
-
    bbSetOutputOut( reader->GetOutput() );
 }
 #endif
@@ -289,6 +287,7 @@ void GetXCoherentInfoGdcmReader::Process()
 
 void GetXCoherentInfoGdcmReader::bbUserSetDefaultValues()
 {
+       reader=NULL;
    std::vector<std::string> init;
    init.push_back("");
    bbSetInputIn(init);  
index 7ea9ae3757a8377c3111190c362da2952e5cd19e..77dc59f1b4ae1b769b85560745fce8364e4956e5 100644 (file)
@@ -49,11 +49,14 @@ void FilesFromDirectory::Process()
 {
        Filenames.clear();
        SimpleFilenames.clear();
-       DirName         = bbGetInputIn();
-       /*int nbFiles = */ Explore(DirName, bbGetInputRecursive(), bbGetInputRecursiveLevel() );
-       CleanFilenames( DirName );
-       bbSetOutputOut(Filenames);   
-       bbSetOutputOutSimple(SimpleFilenames);   
+       if (bbGetInputIn()!="")
+       {
+               DirName         = bbGetInputIn();
+               /*int nbFiles = */ Explore(DirName, bbGetInputRecursive(), bbGetInputRecursiveLevel() );
+               CleanFilenames( DirName );
+               bbSetOutputOut(Filenames);   
+               bbSetOutputOutSimple(SimpleFilenames);   
+       } // if In
 }
 
 void FilesFromDirectory::bbUserSetDefaultValues()