]> Creatis software - bbtk.git/blobdiff - packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
BUG Files Directory
[bbtk.git] / packages / gdcmvtk / src / bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
index 21fcdcf1dcb17dd9e083d0a66f0d49aad2b6c370..93437d05ba9d780521c5ca3de4f26153abc7dd64 100644 (file)
@@ -40,13 +40,6 @@ void GetXCoherentInfoGdcmReader::Process()
       v_ipp.push_back(ipp[i]);
    bbSetOutputIPP(v_ipp );
 
-   std::vector<double> v_pixelspacing;
-   v_pixelspacing.push_back(f->GetXSpacing());
-   v_pixelspacing.push_back(f->GetYSpacing());
-   if (f->GetZSize() != 1) {
-      v_pixelspacing.push_back(f->GetZSpacing());
-   }
-   bbSetOutputPixelSpacing(v_pixelspacing);
 
 // Add all the files to the SerieHelper
    sh = GDCM_NAME_SPACE::SerieHelper::New();
@@ -61,27 +54,6 @@ void GetXCoherentInfoGdcmReader::Process()
    GDCM_NAME_SPACE::FileList::const_iterator it;
    GDCM_NAME_SPACE::FileList *l;
 
-   // ==================== Just to see ==============================
-
-   std::cout << std::endl << " ---------------------------------------- Recap"
-             << std::endl;
-   l = sh->GetFirstSingleSerieUIDFileSet();
-   while (l)
-   {
-      it = l->begin();
-      std::cout << "SerieUID [" <<  (*it)->GetEntryString(0x0020,0x000e) <<"]   Serie Description ["
-                << (*it)->GetEntryString(0x0008,0x103e) << "] "
-                << " : " << l->size() << " files" << std::endl;
-      l = sh->GetNextSingleSerieUIDFileSet();
-   }
-    std::cout << " ----------------------------------------End Recap"
-             << std::endl << std::endl;
-
-   if(l->size() > 1)
-     std::cout << " --------------------------- More than ONE Serie UID ?!?"
-               << std::endl << std::endl;
-   // ============================================================
-
    // Should only contain one!
    l = sh->GetFirstSingleSerieUIDFileSet();
 
@@ -91,11 +63,16 @@ void GetXCoherentInfoGdcmReader::Process()
    sh->OrderFileList(l);
    zspacing = sh->GetZSpacing();
 
-   std::cout << "GetZSpacing() of sorted SingleSerieUIDFileSet "
-             << "from GDCM_NAME_SPACE::SerieHelper: " << zspacing << std::endl;
-   std::cout << " ('-1' means all the files have the same position)" << std::endl;
-
-   bbSetOutputInterSlice(zspacing);
+       std::vector<double> v_pixelspacing;
+       v_pixelspacing.push_back( f->GetXSpacing() );
+       v_pixelspacing.push_back( f->GetYSpacing() );
+       v_pixelspacing.push_back( zspacing );
+//     if (f->GetZSize() != 1) {
+//             v_pixelspacing.push_back(f->GetZSpacing());
+//     }
+       bbSetOutputPixelSpacing(v_pixelspacing);
+       
+       
 
    
    reader = vtkGdcmReader::New();
@@ -104,8 +81,6 @@ void GetXCoherentInfoGdcmReader::Process()
    reader->Update();
    reader->GetOutput();
 
-   vtkIndent indent ;
-   reader->GetOutput()->PrintSelf(std::cout, indent);
    bbSetOutputOut( reader->GetOutput() );
 }