X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fgdcmvtk%2Fsrc%2FbbgdcmvtkGetXCoherentInfoGdcmReader.cxx;fp=packages%2Fgdcmvtk%2Fsrc%2FbbgdcmvtkGetXCoherentInfoGdcmReader.cxx;h=faabc03cf6eca63b458e6c3cfe119ddf5864f823;hb=3f88d1b429d99eca0b5ca0627063e1d08fadefd6;hp=197ed037997da829b0de5672b6af03575e0bc767;hpb=468921bcc742dff540a5becedc6c045c26651f99;p=bbtk.git diff --git a/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx b/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx index 197ed03..faabc03 100644 --- a/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx +++ b/packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx @@ -106,7 +106,9 @@ void GetXCoherentInfoGdcmReader::Process() f->GetImageOrientationPatient(iop); for(i=0; i< 6; i++) + { v_iop.push_back(iop[i]); + } bbSetOutputIOP(v_iop ); std::vector v_ipp; @@ -114,7 +116,9 @@ void GetXCoherentInfoGdcmReader::Process() f->GetImagePositionPatient(ipp); for(i=0; i< 3; i++) + { v_ipp.push_back(ipp[i]); + } bbSetOutputIPP(v_ipp ); // Add *all the files* to the SerieHelper @@ -135,9 +139,7 @@ void GetXCoherentInfoGdcmReader::Process() // Should only contain one! l = sh->GetFirstSingleSerieUIDFileSet(); - int nbFiles; double zspacing = 0.; - nbFiles = l->size() ; sh->OrderFileList(l); // this one should compute the *actual* Z Spacing! zspacing = sh->GetZSpacing(); std::vector v_pixelspacing; @@ -149,6 +151,34 @@ void GetXCoherentInfoGdcmReader::Process() // } bbSetOutputPixelSpacing(v_pixelspacing); + VectorMapInfoDicom vectormapinfodicom; + uint16_t group; + uint16_t elem; + std::string key; + std::string strTagValue; // read on disc + int iTag,sizeDicomTagsVector=bbGetInputDicomTags().size(); + GDCM_NAME_SPACE::FileList::const_iterator iitt = l->begin(); + //iitt ++; + for ( ; iitt != l->end(); ++iitt) + { + MapInfoDicom mapinfodicom; + + for (iTag=0; iTagGetEntryString(group,elem); + mapinfodicom.insert ( std::pair(key,strTagValue) ); + } // for iTag + + vectormapinfodicom.push_back( mapinfodicom ); + } // for iitt + bbSetOutputDicomInfo( vectormapinfodicom ); + if (reader!=NULL) { reader->Delete();