// TODO Swig int SetShaDict(std::string filename);
// TODO Swig int SetPubDict(std::string filename);
+
+// System access
+/**
+ * \ingroup gdcmHeader
+ * \brief the Header Entry Group Number of the 'Pixel Group'
+ * is not allways 0x7fe0
+ * @return GrPixel
+ */
+ guint16 GetGrPixel(void) {return GrPixel;}
+/**
+ * \ingroup gdcmHeader
+ * \brief the Header Entry Element Number of the 'Pixel Element'
+ * is not allways 0x0010
+ * @return NumPixel
+ */
+ guint16 GetNumPixel(void) {return NumPixel;}
// Entry
//-----------------------------------------------------------------------------
// Constructor / Destructor
+
/**
* \ingroup gdcmParser
- * \brief
- * @param InFilename
+ * \brief constructor
+ * @param inFilename
* @param exception_on_error
* @param enable_sequences = true to allow the header
* to be parsed *inside* the SeQuences,
* with a FALSE value for the 'enable_sequence' param.
* ('public elements' may be embedded in 'shadow Sequences')
*/
-gdcmParser::gdcmParser(const char *InFilename,
+gdcmParser::gdcmParser(const char *inFilename,
bool exception_on_error,
bool enable_sequences,
bool ignore_shadow) {
ignoreShadow =ignore_shadow;
SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
- filename = InFilename;
+ filename = inFilename;
Initialise();
if ( !OpenFile(exception_on_error))
/**
* \ingroup gdcmParser
- * \brief
+ * \brief constructor
* @param exception_on_error
*/
gdcmParser::gdcmParser(bool exception_on_error) {
/**
* \ingroup gdcmParser
- * \brief
+ * \brief writes on disc all the Header Entries (Dicom Elements)
+ * of the Chained List
* @param fp file pointer on an already open file
* @param type type of the File to be written
* (ACR-NEMA, ExplicitVR, ImplicitVR)
* \ingroup gdcmParser
* \brief writes on disc according to the requested format
* (ACR-NEMA, ExplicitVR, ImplicitVR) the image
+ * using the Chained List
* \warning does NOT add the missing elements in the header :
* it's up to the user doing it !
* (function CheckHeaderCoherence to be written)
* \warning DON'T try, right now, to write a DICOM image
* from an ACR Header (meta elements will be missing!)
+ * \sa WriteEntriesDeprecated (Special temporay method for Theralys)
* @param type type of the File to be written
* (ACR-NEMA, ExplicitVR, ImplicitVR)
* @param _fp already open file pointer
/**
* \ingroup gdcmParser
* \brief writes on disc according to the requested format
- * (ACR-NEMA, ExplicitVR, ImplicitVR) the image
+ * (ACR-NEMA, ExplicitVR, ImplicitVR) the image,
+ * using only the last synonym of each mutimap H Table post.
* \warning Uses the H Table, instead of the Chained List
* in order to be compliant with the old way to proceed
* (added elements taken in to account)
* to use this method !!!
* \warning DON'T try, right now, to write a DICOM image
* from an ACR Header (meta elements will be missing!)
+ * \sa WriteEntries
* @param _fp already open file pointer
* @param type type of the File to be written
* (ACR-NEMA, ExplicitVR, ImplicitVR)
/**
* \ingroup gdcmParser
- * \brief
- * @param Entry Header Entry whose length of the value shall be loaded.
- * @return
+ * \brief Find the value Length of the passed Header Entry
+ * @param Entry Header Entry whose length of the value shall be loaded.
*/
void gdcmParser::FindHeaderEntryLength (gdcmHeaderEntry *Entry) {
guint16 element = Entry->GetElement();
return false;
}
-
/**
* \ingroup gdcmParser
- * \brief
+ * \brief Find the Length till the next sequence delimiter
* \warning NOT end user intended method !
* @return
*/
+
guint32 gdcmParser::FindHeaderEntryLengthOB(void) {
// See PS 3.5-2001, section A.4 p. 49 on encapsulation of encoded pixel data.
guint16 g;
{
public:
gdcmParser(bool exception_on_error = false);
- gdcmParser(const char *filename,
+ gdcmParser(const char *inFilename,
bool exception_on_error = false,
bool enable_sequences = false,
bool ignore_shadow = false);
* \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
*/
void SetPrintLevel(int level) { printLevel = level; };
+ /**
+ * \ingroup gdcmParser
+ * \brief canonical Printer
+ * \sa SetPrintLevel
+ */
virtual void Print (std::ostream &os = std::cout) {PrintEntry(os);};
virtual void PrintEntry (std::ostream &os = std::cout);
virtual void PrintPubDict (std::ostream &os = std::cout);
virtual void PrintShaDict (std::ostream &os = std::cout);
// Standard values
+ /**
+ * \ingroup gdcmParser
+ * \brief Gets the external File Name
+ */
inline std::string GetFileName(void) {return filename;}
// Dictionnaries
*/
inline ListTag &GetListEntry(void) { return listEntries; };
-// Read (used in gdcmFile)
+// Read (used in gdcmFile, gdcmDicomDir)
FILE *OpenFile(bool exception_on_error = false) throw(gdcmFileError);
bool CloseFile(void);
-// Write (used in gdcmFile)
+// Write (used in gdcmFile, gdcmDicomDir)
virtual bool Write(FILE *, FileType);
bool ReplaceOrCreateByNumber(std::string Value, guint16 Group, guint16 Elem);
bool ReplaceIfExistByNumber ( char *Value, guint16 Group, guint16 Elem);
// System access
+ /**
+ * \ingroup gdcmHeader
+ * \brief returns the 'swap code'
+ * (Big Endian, Little Endian,
+ * Bad Big Endian, Bad Little Endian)
+ * according to the processor Endianity and what's written on disc
+ * return
+ */
inline int GetSwapCode(void) { return sw; }
- guint16 GetGrPixel(void) {return GrPixel;}
- guint16 GetNumPixel(void) {return NumPixel;}
guint16 SwapShort(guint16); // needed by gdcmFile
guint32 SwapLong(guint32); // needed by gdcmFile
void AddHeaderEntry (gdcmHeaderEntry *);
// Variables
+ /**
+ * \brief File Pointer, open during Header parsing
+ */
FILE *fp;
- FileType filetype; // ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown
+ /**
+ * \brief ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown
+ */
+ FileType filetype;
static const unsigned int HEADER_LENGTH_TO_READ;
static const unsigned int MAX_SIZE_LOAD_ELEMENT_VALUE;
static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE;
protected:
- TagHeaderEntryHT tagHT; // H Table (multimap), to provide fast access
- ListTag listEntries; // chained list, to keep the 'spacial' ordering
-
+ /**
+ * \brief H Table (multimap), to provide fast access
+ */
+ TagHeaderEntryHT tagHT;
+ /**
+ * \brief chained list, to keep the 'spacial' ordering
+ */
+ ListTag listEntries;
+ /**
+ * \brief will be set 1 if user asks to 'go inside' the 'sequences' (VR = "SQ")
+ */
int enableSequences;
+ /**
+ * \brief amount of printed details for each Header Entry (Dicom Element)
+ * 0 : the least
+ */
int printLevel;
- // For some ACR-NEMA images, it's *not* 7fe0, 0010 ...
+ /**
+ * \brief For some ACR-NEMA images, it's *not* 7fe0 ...
+ */
guint16 GrPixel;
+
+ /**
+ * \brief For some ACR-NEMA images, it's *not* 0010 ...
+ */
guint16 NumPixel;
- // some files may contain icons; GrPixel,NumPixel appears several times
- // Let's remember how many times!
+ /**
+ * \brief some files may contain icons; GrPixel,NumPixel appears several times
+ * Let's remember how many times!
+ */
int countGrPixel;
private:
+++ /dev/null
-// gdcmDicomDirSerie.h
-//-----------------------------------------------------------------------------
-#ifndef GDCMDICOMDIRSERIE_H
-#define GDCMDICOMDIRSERIE_H
-
-#include "gdcmObject.h"
-#include "gdcmDicomDirImage.h"
-
-//-----------------------------------------------------------------------------
-typedef std::list<gdcmDicomDirImage *> ListDicomDirImage;
-
-//-----------------------------------------------------------------------------
-class GDCM_EXPORT gdcmDicomDirSerie : public gdcmObject
-{
-public:
- gdcmDicomDirSerie(ListTag::iterator begin,ListTag::iterator end);
- ~gdcmDicomDirSerie(void);
-
- virtual void Print(std::ostream &os = std::cout);
-
- inline ListDicomDirImage &GetDicomDirImages() {return images;};
- inline void AddDicomDirImage(gdcmDicomDirImage *obj) {images.push_back(obj);};
-
-private:
- ListDicomDirImage images;
-};
-
-//-----------------------------------------------------------------------------
-#endif