X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fgdcmvtk%2Fsrc%2FbbgdcmvtkGetInfoGdcmReader.cxx;h=2e0a07ecaab11a88fb017e2284c12cb8d8ee2e66;hb=df83d588a290ecb66676e9ba021cdc07ac4eb44e;hp=07da598549592d325533c17d2c0a8562c57c2218;hpb=64953af6e7389a36c4fb533b58bf720ba1342cd7;p=bbtk.git diff --git a/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx b/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx index 07da598..2e0a07e 100644 --- a/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx +++ b/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx @@ -26,11 +26,12 @@ void GetInfoGdcmReader::Process() bbSetOutputOut(0); return; } - // Get info from the image file + // Get info from THE image file (only *one* as input) int i; std::vector v_iop; float iop[6]; f->GetImageOrientationPatient(iop); + for(i=0; i< 6; i++) v_iop.push_back(iop[i]); bbSetOutputIOP(v_iop ); @@ -38,6 +39,7 @@ void GetInfoGdcmReader::Process() std::vector v_ipp; float ipp[3]; f->GetImagePositionPatient(ipp); + for(i=0; i< 3; i++) v_ipp.push_back(ipp[i]); bbSetOutputIPP(v_ipp ); @@ -45,7 +47,9 @@ void GetInfoGdcmReader::Process() std::vector v_pixelspacing; v_pixelspacing.push_back(f->GetXSpacing()); v_pixelspacing.push_back(f->GetYSpacing()); - if (f->GetZSize() != 1) { + + if (f->GetZSize() != 1) + { v_pixelspacing.push_back(f->GetZSpacing()); } bbSetOutputPixelSpacing(v_pixelspacing); @@ -65,9 +69,9 @@ void GetInfoGdcmReader::Process() void GetInfoGdcmReader::bbUserSetDefaultValues() { - reader=NULL; - f=NULL; - bbSetInputIn(""); + reader=NULL; + f=NULL; + bbSetInputIn(""); } void GetInfoGdcmReader::bbUserInitializeProcessing() @@ -78,15 +82,16 @@ void GetInfoGdcmReader::bbUserInitializeProcessing() void GetInfoGdcmReader::bbUserFinalizeProcessing() { - if(reader){ + if( reader ) + { reader->Delete(); - reader=NULL; - } - if(f){ + reader=NULL; + } + if(f) + { f->Delete(); - f=NULL; - } - + f=NULL; + } } }