X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFile.cxx;h=e1c6c35f9a851e74691bb9b53b8afc7de22ee219;hb=da1e01950ef7dec245c16f73902d614ca2e40a71;hp=13570e2196845545714e5805701b3f2917c0ef85;hpb=db42dcafe4dafd893c12b6d209870d66ec474a1b;p=gdcm.git diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 13570e21..e1c6c35f 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2005/07/20 14:49:41 $ - Version: $Revision: 1.254 $ + Date: $Date: 2005/07/24 02:34:41 $ + Version: $Revision: 1.263 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,14 +26,16 @@ // as the Z coordinate, // 0. for all the coordinates if nothing is found // -// Image Position (Patient) (0020,0032) What is it used for? +// Image Position (Patient) (0020,0032) VM=3 What is it used for? // --> // The attribute Patient Orientation (0020,0020) from the General Image Module // is of type 2C and has the condition Required if image does not require // Image Orientation (0020,0037) and Image Position (0020,0032). -// However, if the image does require the attributes Image Orientation (0020,0037) -// and Image Position (0020,0032) then attribute Patient Orientation (0020,0020) -// should not be present in the images. +// However, if the image does require the attributes +// - Image Orientation (Patient) (0020,0037), VM=6 +// - Image Position Patient (0020,0032), VM=3 +// then attribute Patient Orientation (0020,0020) should not be present +// in the images. // // Remember also : // Patient Position (0018,5100) values : HFP = Head First-Prone @@ -44,9 +46,22 @@ // FFDL = Feet First-Decubitus Left // FFP = Feet First-Prone // FFS = Feet First-Supine +// can also find SEMIERECT +// SUPINE // CS 2 Patient Orientation (0020 0020) // When the coordinates of the image -// are always present, this field is almost never used +// are always present, this field is almost never used. +// Better we don't tust it too much ... +// Found Values are : L\P +// L\FP +// P\F +// L\F +// P\FR +// R\F +// +// (0020|0037) [Image Orientation (Patient)] [1\0\0\0\1\0 ] + + // --------------------------------------------------------------- // #include "gdcmFile.h" @@ -66,6 +81,7 @@ namespace gdcm { + //----------------------------------------------------------------------------- // Constructor / Destructor @@ -719,7 +735,7 @@ float File::GetZOrigin() * @param iop adress of the (6)float array to receive values * @return cosines of image orientation patient */ -void File::GetImageOrientationPatient( float iop[6] ) +bool File::GetImageOrientationPatient( float iop[6] ) { std::string strImOriPat; //iop is supposed to be float[6] @@ -732,6 +748,7 @@ void File::GetImageOrientationPatient( float iop[6] ) &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 ) { gdcmWarningMacro( "Wrong Image Orientation Patient (0020,0037). Less than 6 values were found." ); + return false; } } //For ACR-NEMA @@ -742,8 +759,10 @@ void File::GetImageOrientationPatient( float iop[6] ) &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 ) { gdcmWarningMacro( "wrong Image Orientation Patient (0020,0035). Less than 6 values were found." ); + return false; } } + return true; } /** @@ -1745,7 +1764,8 @@ File::File( std::string const &filename ) RLEInfo = new RLEFramesInfo; JPEGInfo = new JPEGFragmentsInfo; - Load( filename ); // gdcm::Document is first Loaded, then the 'File part' + SetFileName( filename ); + Load( ); // gdcm::Document is first Loaded, then the 'File part' } /**