-public:
- File( );
- File( Header *header );
- File( std::string const &filename );
-
- virtual ~File();
-
- void Print(std::ostream &os = std::cout, std::string const & indent = "");
-
- /// Accessor to \ref Header
- Header *GetHeader() { return HeaderInternal; }
-
- size_t GetImageDataSize();
- size_t GetImageDataRawSize();
-
- uint8_t *GetImageData();
- uint8_t *GetImageDataRaw();
- size_t GetImageDataIntoVector(void *destination, size_t maxSize);
-
- void SetImageData(uint8_t *data, size_t expectedSize);
-
- // User datas
- void SetUserData(uint8_t *data, size_t expectedSize);
- uint8_t* GetUserData();
- size_t GetUserDataSize();
- // RBG datas (from file
- uint8_t* GetRGBData();
- size_t GetRGBDataSize();
- // RAW datas (from file
- uint8_t* GetRawData();
- size_t GetRawDataSize();
-
- // Write pixels of ONE image on hard drive
- // No test is made on processor "endianity"
- // The user must call his reader correctly
- bool WriteRawData (std::string const &fileName);
- bool WriteDcmImplVR(std::string const &fileName);
- bool WriteDcmExplVR(std::string const &fileName);
- bool WriteAcr (std::string const &fileName);
- bool Write (std::string const &fileName);
-
- bool SetEntry(std::string const &content,
- uint16_t group, uint16_t element);
- bool SetEntry(uint8_t *content, int lgth,
- uint16_t group, uint16_t element);
- bool ReplaceOrCreate(std::string const &content,
- uint16_t group, uint16_t element);
- bool ReplaceOrCreate(uint8_t *binArea, int lgth,
- uint16_t group, uint16_t element);
-
- uint8_t* GetLutRGBA();
-
- // Write mode
- void SetWriteModeToRaw() { SetWriteMode(WMODE_RAW); };
- void SetWriteModeToRGB() { SetWriteMode(WMODE_RGB); };
- void SetWriteMode(FileMode mode) { WriteMode = mode; };
- FileMode GetWriteMode() { return WriteMode; };
-
- // Write format
- void SetWriteTypeToDcmImplVR() { SetWriteType(ImplicitVR); };
- void SetWriteTypeToDcmExplVR() { SetWriteType(ExplicitVR); };
- void SetWriteTypeToAcr() { SetWriteType(ACR); };
- void SetWriteTypeToAcrLibido() { SetWriteType(ACR_LIBIDO); };
- void SetWriteType(FileType format) { WriteType = format; };
- FileType GetWriteType() { return WriteType; };
+ bool GetImageOrientationPatient( float iop[6] );
+ bool GetImagePositionPatient( float ipp[3] );
+
+ int GetBitsStored();
+ int GetBitsAllocated();
+ int GetHighBitPosition();
+ int GetSamplesPerPixel();
+ int GetPlanarConfiguration();
+ int GetPixelSize();
+ std::string GetPixelType();
+ bool IsSignedPixelData();
+ bool IsMonochrome();
+ bool IsMonochrome1();
+ bool IsPaletteColor();
+ bool IsYBRFull();
+
+ bool HasLUT();
+ int GetLUTNbits();
+
+ // For rescaling graylevel:
+ bool GetRescaleSlopeIntercept(double &slope, double &intercept);
+ double GetRescaleIntercept();
+ double GetRescaleSlope();
+
+ int GetNumberOfScalarComponents();
+ int GetNumberOfScalarComponentsRaw();
+
+ /// Accessor to File::GrPixel
+ uint16_t GetGrPixel() { return GrPixel; }
+ /// Accessor to File::NumPixel
+ uint16_t GetNumPixel() { return NumPixel; }
+
+ size_t GetPixelOffset();
+ size_t GetPixelAreaLength();
+
+ /// returns the RLE info
+ RLEFramesInfo *GetRLEInfo() { return RLEInfo; }
+ /// Returns the JPEG Fragments info
+ JPEGFragmentsInfo *GetJPEGInfo() { return JPEGInfo; }
+
+// Anonymization process
+ void AddAnonymizeElement (uint16_t group, uint16_t elem,
+ std::string const &value);
+ /// Clears the list of elements to be anonymized
+ void ClearAnonymizeList() { UserAnonymizeList.clear(); }
+ void AnonymizeNoLoad();
+ /// Replace patient's own information by info from the Anonymization list
+ bool AnonymizeFile();
+
+ bool Write(std::string fileName, FileType filetype);