]> Creatis software - creaImageIO.git/blobdiff - bbtk/src/bbcreaImageIOReadImages.cxx
#3320 ReadImages box
[creaImageIO.git] / bbtk / src / bbcreaImageIOReadImages.cxx
index 33a7839e7554c2e43e0d1ccf32ff5b3616990c74..8098413d0e98fcb4d148d3e26d697d71a8405b8c 100644 (file)
@@ -34,15 +34,23 @@ void ReadImages::Process()
        std::vector<vtkImageData*>                                                      mResults;
        VectorMapInfoDicom                                                                      mResultsDicomAtr;
        creaImageIO::SimpleView                                                         mView;
-       if( mView.readFile(bbGetInputLstNameImages() , bbGetInputDicomTags() , mResultsDicomAtr , mResults)==true )
+  
+       if (bbGetInputActive()==true)
        {
-               bbSetOutputOut( mView.getVolumeSelected( mResults ) );
-               bbSetOutputOutImages( mResults  );
-               bbSetOutputDicomInfo( mResultsDicomAtr  );
+               if( mView.readFile(bbGetInputLstNameImages() , bbGetInputDicomTags() , mResultsDicomAtr , mResults)==true )
+               {
+                       bbSetOutputOut( mView.getVolumeSelected( mResults ) );
+                       bbSetOutputOutImages( mResults  );
+                       bbSetOutputDicomInfo( mResultsDicomAtr  );
+               } else {
+                       bbSetOutputOut( NULL );
+                       printf("EED Warning! ReadImages::Process   Files(s) not found. \n");
+               }// if readFile
        } else {
-               bbSetOutputOut( NULL );
-               printf("EED Warning! ReadImages::Process   Files(s) not found. \n");
-       }// if readFile
+                       bbSetOutputOutImages( mResults  );
+                       bbSetOutputDicomInfo( mResultsDicomAtr  );
+                       bbSetOutputOut( NULL );         
+       }//Active       
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
@@ -52,7 +60,7 @@ void ReadImages::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
-//   bbSetInputIn(0);
+   bbSetInputActive(true);
   
 }
 //=====