X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFile.h;h=29287b24a9bc6842472a8dfe6aef9e43943af071;hb=55d77e0913ff360d639af1841c70d14dc8687584;hp=6773662c46f08f9d47ec7a75682d508d63239b9d;hpb=06c1c583239fdf5196260e6ef83a78669c1bd17f;p=gdcm.git diff --git a/src/gdcmFile.h b/src/gdcmFile.h index 6773662c..29287b24 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -10,7 +10,7 @@ /* * In addition to Dicom header exploration, this class is designed * for accessing the image/volume content. One can also use it to - * write Dicom files. + * write Dicom/ACR-NEMA/RAW files. */ class GDCM_EXPORT gdcmFile { @@ -57,19 +57,19 @@ public: // TODO Swig int Write(); // Write pixels of ONE image on hard drive - // No test is made on processor "stupidity" + // No test is made on processor "endianity" // The user must call his reader correctly bool WriteRawData (std::string fileName); bool WriteDcmImplVR(std::string fileName); bool WriteDcmImplVR(const char * fileName); bool WriteDcmExplVR(std::string fileName); bool WriteAcr (std::string fileName); - -protected: - bool WriteBase(std::string FileName, FileType type); - + // Body in file gdcmParse.cxx bool ParsePixelData(void); + +protected: + bool WriteBase(std::string FileName, FileType type); private: void SwapZone(void* im, int swap, int lgr, int nb); @@ -89,16 +89,29 @@ private: bool gdcm_read_RLE_file (FILE *fp,void * image_buffer); // Variables - gdcmHeader *Header; // Header to use to load the file + /// Header to use to load the file + gdcmHeader *Header; bool SelfHeader; void* PixelData; - size_t lgrTotaleRaw; // Area length to receive the pixels - size_t lgrTotale; // Area length to receive the RGB pixels - // from Grey Plane + Palette Color - - int Parsed; // weather already parsed - std::string OrigFileName; // To avoid file overwrite + + /// Area length to receive the pixels + size_t lgrTotaleRaw; + + /// Area length to receive the RGB pixels + /// from Grey Plane + Palette Color + size_t lgrTotale; + + /// ==1 if GetImageDataRaw was used + /// ==0 if GetImageData was used + /// ==-1 if ImageData never read + int PixelRead; + . + /// weather already parsed + int Parsed; + + /// To avoid file overwrite + std::string OrigFileName; }; //-----------------------------------------------------------------------------