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();
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();
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();
reader->Update();
reader->GetOutput();
- vtkIndent indent ;
- reader->GetOutput()->PrintSelf(std::cout, indent);
bbSetOutputOut( reader->GetOutput() );
}
BBTK_DECLARE_OUTPUT(IPP, std::vector<double>);
BBTK_DECLARE_OUTPUT(IOP, std::vector<double>);
BBTK_DECLARE_OUTPUT(PixelSpacing, std::vector<double>);
- BBTK_DECLARE_OUTPUT(InterSlice, double);
BBTK_PROCESS(Process);
void Process();
BBTK_OUTPUT(GetXCoherentInfoGdcmReader,IPP, "Image Position (Patient)", std::vector<double>,"");
BBTK_OUTPUT(GetXCoherentInfoGdcmReader,IOP, "Image Orientation (Patient)", std::vector<double>,"");
BBTK_OUTPUT(GetXCoherentInfoGdcmReader,PixelSpacing,"Pixel Spacing", std::vector<double>,"");
-BBTK_OUTPUT(GetXCoherentInfoGdcmReader,InterSlice, "InterSlice", double,"");
BBTK_END_DESCRIBE_BLACK_BOX(GetXCoherentInfoGdcmReader);
} // EO namespace bbgdcmvtk