// Constructor / Destructor
/*
* \ingroup gdcmDicomDir
- * \brief
+ * \brief Constructor
* @param Filename
* @param exception_on_error
*/
//-----------------------------------------------------------------------------
// Print
+/*
+ * \ingroup gdcmDicomDir
+ * \brief Canonical Printer
+ */
void gdcmDicomDir::Print(std::ostream &os)
{
for(ListPatient::iterator cc=patients.begin();cc!=patients.end();++cc)
* \ingroup gdcmDicomDir
* \brief writes on disc a DICOMDIR
* \ warning does NOT add the missing elements in the header :
- * \ it's up to the user doing it !
+ * it's up to the user doing it !
* @param fileName file to be written to
- * @return
+ * @return false only when fail to open
*/
bool gdcmDicomDir::Write(std::string fileName)
{
return true;
}
+/*
+ * \ingroup gdcmDicomDir
+ * \brief fills whole the structure
+ */
void gdcmDicomDir::ParseDirectory(void)
{
NewDicomDir(GetPath());
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
+ * @param path entry point of the stree-like structure
*/
void gdcmDicomDir::NewDicomDir(std::string path)
{
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
+ * @param type
+ * @param begin
+ * @param end
*/
void gdcmDicomDir::AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end)
{
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
- */
+ * @param begin
+ * @param end
+*/
void gdcmDicomDir::AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end)
{
patients.push_back(new gdcmPatient(begin,end));
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
+ * @param begin
+ * @param end
*/
void gdcmDicomDir::AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end)
{
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
+ * @param begin
+ * @param end
*/
void gdcmDicomDir::AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end)
{
/*
* \ingroup gdcmDicomDir
- * \brief
+ * @param begin
+ * @param end
* @param
*/
void gdcmDicomDir::AddImageToEnd(ListTag::iterator begin,ListTag::iterator end)
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
+ * @param path
+ * @param list
*/
void gdcmDicomDir::SetElements(std::string &path,ListHeader &list)
{
/*
* \ingroup gdcmDicomDir
* \brief
- * @param
+ * @param path
+ * @param type
+ * @param header
*/
void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type,gdcmHeader *header)
{
//-----------------------------------------------------------------------------
// Constructor / Destructor
-gdcmDicomDirElement::gdcmDicomDirElement(void)
+
+/**
+ * \ingroup gdcmDicomDirElement
+ * \brief constructor
+ */
+ gdcmDicomDirElement::gdcmDicomDirElement(void)
{
std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_ELEM);
std::ifstream from(filename.c_str());
from.close();
}
-gdcmDicomDirElement::~gdcmDicomDirElement()
+/**
+ * \ingroup gdcmDicomDirElement
+ * \brief destructor
+ */
+ gdcmDicomDirElement::~gdcmDicomDirElement()
{
MetaList.clear();
PatientList.clear();
//-----------------------------------------------------------------------------
// Print
/**
- * \ingroup gdcmVR
- * \brief Print all
+ * \ingroup gdcmDicomDirElement
+ * \brief Print all
+ * \todo add a 'Print Level' check
* @param os The output stream to be written to.
*/
void gdcmDicomDirElement::Print(std::ostream &os)
* \ingroup gdcmDict
* \brief Print all the dictionary entries contained in this dictionary.
* Entries will be sorted by the name of the dictionary entries.
- * \warning AVOID USING IT : the name IS NOT an identifier
+ * \warning AVOID USING IT : the name IS NOT an identifier;
* unpredictable result
* @param os The output stream to be written to.
*/
/**
* \ingroup gdcmDict
* \brief adds a new Dicom Dictionary Entry
- * @param NewEntry
+ * @param NewEntry entry to add
* @return false if Dicom Element already existed
*/
bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry)
/**
* \ingroup gdcmDict
* \brief replaces an already existing Dicom Element by a new one
- * @param NewEntry
+ * @param NewEntry new entry (overwrites any previous one with same tag)
* @return false if Dicom Element doesn't exist
*/
bool gdcmDict::ReplaceEntry(gdcmDictEntry *NewEntry) {
/**
* \ingroup gdcmDict
* \brief removes an already existing Dicom Dictionary Entry,
- * identified by its group,element
- number
+ * identified by its group,element number
* @param group Dicom group number of the Dicom Element
* @param element Dicom element number of the Dicom Element
* @return false if Dicom Dictionary Entry doesn't exist
* than asking us to perform a line by line check of the dictionnary
* at the beginning of each year to -try to- guess the changes)
* Therefore : please NEVER use that fourth field :-(
- * *
+ *
* @return An hashtable: whose keys are the names of the groups and whose
* corresponding values are lists of all the dictionnary entries
* among that group.
* @param InGroup DICOM-Group Number
* @param InElement DICOM-Element Number
* @param InVr Value Representatiion
- * @param InFourth // DO NOT use any longer
+ * @param InFourth // DO NOT use any longer;
* NOT part of the Dicom Standard
* @param InName description of the element
*/
* \ingroup gdcmDictSet
* \brief Consider all the entries of the public dicom dictionnary.
* Build all list of all the tag names of all those entries.
- * \sa gdcmDictSet::GetPubDictTagNamesByCategory
+ * \sa gdcmDictSet::GetPubDictTagNamesByCategory
* @return A list of all entries of the public dicom dictionnary.
*/
std::list<std::string> *gdcmDictSet::GetPubDictEntryNames(void)
/**
* \ingroup gdcmDictSet
- * \brief Consider all the entries of the public dicom dictionnary.
- * Build an hashtable whose keys are the names of the groups
- * (fourth field in each line of dictionary) and whose corresponding
- * values are lists of all the dictionnary entries among that
- * group. Note that apparently the Dicom standard doesn't explicitely
- * define a name (as a string) for each group.
- * A typical usage of this method would be to enable a dynamic
- * configuration of a Dicom file browser: the admin/user can
- * select in the interface which Dicom tags should be displayed.
- * \warning Dicom *doesn't* define any name for any 'categorie'
+ * \brief - Consider all the entries of the public dicom dictionnary.
+ * Build an hashtable whose keys are the names of the groups
+ * (fourth field in each line of dictionary) and whose corresponding
+ * values are lists of all the dictionnary entries among that
+ * group. Note that apparently the Dicom standard doesn't explicitely
+ * define a name (as a string) for each group.
+ * - A typical usage of this method would be to enable a dynamic
+ * configuration of a Dicom file browser: the admin/user can
+ * select in the interface which Dicom tags should be displayed.
+ * \warning
+ * - Dicom *doesn't* define any name for any 'categorie'
* (the dictionnary fourth field was formerly NIH defined
- * - and no longer he is-
+ * -and no longer he is-
* and will be removed when Dicom provides us a text file
* with the 'official' Dictionnary, that would be more friendly
* than asking us to perform a line by line check of the dictionnary
* at the beginning of each year to -try to- guess the changes)
- * Therefore : please NEVER use that fourth field :-(
+ * - Therefore : please NEVER use that fourth field :-(
* *
* @return An hashtable: whose keys are the names of the groups and whose
* corresponding values are lists of all the dictionnary entries
// Constructor / Destructor
/*
* \ingroup gdcmDirList
- * \brief
+ * \brief Constructor
* @param
*/
gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
/*
* \ingroup gdcmDirList
- * \brief
+ * \brief Destructor
* @param
*/
gdcmDirList::~gdcmDirList(void)
//-----------------------------------------------------------------------------
// gdcmException
+
+/*
+ * \ingroup gdcmException
+ * \brief
+ * @param
+ */
gdcmException::gdcmException(const std::string &f, const std::string& msg) throw()
#ifdef __GNUC__
try
#endif
-void gdcmException::fatal(const char *from) throw() {
+/*
+ * \ingroup gdcmException
+ * \brief
+ * @param
+ */
+ void gdcmException::fatal(const char *from) throw() {
try {
std::cerr << "Fatal: exception received in " << from
<< " while handling exception." << std::endl;
}
}
-std::string gdcmException::getName() const throw() {
+/*
+ * \ingroup gdcmException
+ * \brief
+ * @param
+ */
+ std::string gdcmException::getName() const throw() {
try {
#ifdef __GNUC__ // GNU C++ compiler class name demangling
unsigned int nested = 1, i, nb, offset;
}
}
-gdcmException::operator const char *() const throw() {
+/*
+ * \ingroup gdcmException
+ * \brief
+ * @param
+ */
+ gdcmException::operator const char *() const throw() {
return getName().c_str();
}
//-----------------------------------------------------------------------------
-std::ostream& operator<<(std::ostream &os, const gdcmException &e) {
+/*
+ * \ingroup gdcmException
+ * \brief
+ * @param
+ */
+ std::ostream& operator<<(std::ostream &os, const gdcmException &e) {
try {
os << "Exception " << e.getName() << " thrown: " << e.getError() << std::endl;
}
* file (see SetFileName, SetDcmTag and Write)
* Opens (in read only and when possible) an existing file and checks
* for DICOM compliance. Returns NULL on failure.
- * \Note the in-memory representation of all available tags found in
+ * \note the in-memory representation of all available tags found in
* the DICOM header is post-poned to first header information access.
* This avoid a double parsing of public part of the header when
* one sets an a posteriori shadow dictionary (efficiency can be
* seen as a side effect).
- *
* @param header file to be opened for reading datas
- *
* @return
*/
* file (see SetFileName, SetDcmTag and Write)
* Opens (in read only and when possible) an existing file and checks
* for DICOM compliance. Returns NULL on failure.
- * \Note the in-memory representation of all available tags found in
+ * \note the in-memory representation of all available tags found in
* the DICOM header is post-poned to first header information access.
* This avoid a double parsing of public part of the header when
* one sets an a posteriori shadow dictionary (efficiency can be
* seen as a side effect).
* @param filename file to be opened for parsing
- * @return
*/
gdcmFile::gdcmFile(std::string & filename) {
Header=new gdcmHeader(filename.c_str());
SetPixelDataSizeFromHeader();
}
-gdcmFile::gdcmFile(const char * filename) {
+/**
+ * \ingroup gdcmFile
+ * \brief Constructor dedicated to writing a new DICOMV3 part10 compliant
+ * file (see SetFileName, SetDcmTag and Write)
+ * Opens (in read only and when possible) an existing file and checks
+ * for DICOM compliance. Returns NULL on failure.
+ * \note the in-memory representation of all available tags found in
+ * the DICOM header is post-poned to first header information access.
+ * This avoid a double parsing of public part of the header when
+ * one sets an a posteriori shadow dictionary (efficiency can be
+ * seen as a side effect).
+ * @param filename file to be opened for parsing
+ */
+ gdcmFile::gdcmFile(const char * filename) {
Header=new gdcmHeader(filename);
SelfHeader=true;
PixelRead=-1; // no ImageData read yet.
/**
* \ingroup gdcmFile
* \brief Returns the size (in bytes) of required memory to hold
- * \ the pixel data represented in this file, when user DOESN'T want
- * \ to get RGB pixels image when it's stored as a PALETTE COLOR image
- * \ - the (vtk) user is supposed to know how deal with LUTs -
+ * the pixel data represented in this file, when user DOESN'T want
+ * to get RGB pixels image when it's stored as a PALETTE COLOR image
+ * -the (vtk) user is supposed to know how deal with LUTs-
* \warning to be used with GetImagePixelsRaw()
* @return The size of pixel data in bytes.
*/
* Transforms 3 planes R, G, B into a single RGB Plane
* Transforms single Grey plane + 3 Palettes into a RGB Plane
* @return Pointer to newly allocated pixel data.
- * \ NULL if alloc fails
+ * NULL if alloc fails
*/
void * gdcmFile::GetImageData (void) {
PixelData = (void *) malloc(lgrTotale);
* \ingroup gdcmFile
* \brief TODO JPR
* \warning doit-etre etre publique ?
- * TODO : y a-t-il un inconvenient à fusioner ces 2 fonctions
+ * \toto : y a-t-il un inconvenient à fusioner ces 2 fonctions
*
* @param inData
* @param ExpectedSize
* \ingroup gdcmFile
* \brief Writes on disk A SINGLE Dicom file
* NO test is performed on processor "Endiannity".
- * Ca sera à l'utilisateur d'appeler son Reader correctement
- * (Equivalent a IdImaWriteRawFile)
- *
+ * It's up to the user to call his Reader properly
* @param fileName name of the file to be created
* (any already existing file is over written)
* @return false if write fails
* \ingroup gdcmFile
* \brief Writes on disk A SINGLE Dicom file
* NO test is performed on processor "Endiannity".
- *
* @param fileName name of the file to be created
* (any already existing file is overwritten)
* @return false if write fails
/**
* \ingroup gdcmFile
*
-* @param fileName name of the file to be created
+ * @param fileName name of the file to be created
* (any already existing file is overwritten)
* @param type file type (ExplicitVR, ImplicitVR, ...)
* @return false if write fails
// Constructor / Destructor
/**
* \ingroup gdcmHeader
- * \brief
+ * \brief Constructor
* @param InFilename
* @param exception_on_error
* @param enable_sequences = true to allow the header
* - 32S signed 32 bit,
* - FD floating double 64 bits (Not kosher DICOM, but so usefull!)
* \warning 12 bit images appear as 16 bit.
- * \ 24 bit images appear as 8 bit
+ * 24 bit images appear as 8 bit
* @return 0S if nothing found. NOT USABLE file. The caller has to check
*/
std::string gdcmHeader::GetPixelType(void) {
/**
* \ingroup gdcmHeader
* \brief Recover the offset (from the beginning of the file)
- * \ of *image* pixels (not *icone image* pixels, if any !)
+ * of *image* pixels (not *icone image* pixels, if any !)
* @return Pixel Offset
*/
size_t gdcmHeader::GetPixelOffset(void) {
* \brief Recover the pixel area length (in Bytes)
* @return Pixel Element Length, as stored in the header
* (NOT the memory space necessary to hold the Pixels
- * - in case of embeded compressed image-)
+ * -in case of embeded compressed image-)
* 0 : NOT USABLE file. The caller has to check.
*/
size_t gdcmHeader::GetPixelAreaLength(void) {
* \ingroup gdcmHeader
* \brief tells us if LUT are used
* \warning Right now, 'Segmented xxx Palette Color Lookup Table Data'
- * \ are NOT considered as LUT, since nobody knows
- * \ how to deal with them
- * \ Please warn me if you know sbdy that *does* know ... jprx
+ * are NOT considered as LUT, since nobody knows
+ * how to deal with them
+ * Please warn me if you know sbdy that *does* know ... jprx
* @return true if LUT Descriptors and LUT Tables were found
*/
bool gdcmHeader::HasLUT(void) {
/**
* \ingroup gdcmHeader
* \brief gets the info from 0028,1101 : Lookup Table Desc-Red
- * \ else 0
+ * else 0
* @return Lookup Table number of Bits , 0 by default
- * \ when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
+ * when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
* @ return bit number of each LUT item
*/
int gdcmHeader::GetLUTNbits(void) {
/**
* \ingroup gdcmHeader
* \brief builts Red/Green/Blue/Alpha LUT from Header
- * \ when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
- * \ and (0028,1101),(0028,1102),(0028,1102)
- * \ - xxx Palette Color Lookup Table Descriptor - are found
- * \ and (0028,1201),(0028,1202),(0028,1202)
- * \ - xxx Palette Color Lookup Table Data - are found
+ * when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
+ * and (0028,1101),(0028,1102),(0028,1102)
+ * - xxx Palette Color Lookup Table Descriptor - are found
+ * and (0028,1201),(0028,1202),(0028,1202)
+ * - xxx Palette Color Lookup Table Data - are found
* \warning does NOT deal with :
- * \ 0028 1100 Gray Lookup Table Descriptor (Retired)
- * \ 0028 1221 Segmented Red Palette Color Lookup Table Data
- * \ 0028 1222 Segmented Green Palette Color Lookup Table Data
- * \ 0028 1223 Segmented Blue Palette Color Lookup Table Data
- * \ no known Dicom reader deals with them :-(
+ * 0028 1100 Gray Lookup Table Descriptor (Retired)
+ * 0028 1221 Segmented Red Palette Color Lookup Table Data
+ * 0028 1222 Segmented Green Palette Color Lookup Table Data
+ * 0028 1223 Segmented Blue Palette Color Lookup Table Data
+ * no known Dicom reader deals with them :-(
* @return a RGBA Lookup Table
*/
unsigned char * gdcmHeader::GetLUTRGBA(void) {
/**
* \ingroup gdcmHeader
* \brief gets the info from 0002,0010 : Transfert Syntax
- * \ else 1.
+ * else 1.
* @return Transfert Syntax Name (as oposite to Transfert Syntax UID)
*/
std::string gdcmHeader::GetTransfertSyntaxName(void) {
//-----------------------------------------------------------------------------
// Print
+/**
+ * \ingroup gdcmHeaderEntry
+ * \brief canonical Printer
+ */
void gdcmHeaderEntry::Print(std::ostream & os) {
size_t o;
unsigned short int g, e;
#include <math.h>
#include <algorithm>
-/*#ifdef _MSC_VER
- #include <windows.h>
-
- int GetDir(std::string dPath, std::list<std::string> &filenames)
- {
- //For now dPath should have an ending "\"
- WIN32_FIND_DATA FileData;
- HANDLE hFile;
- hFile = FindFirstFile((dPath+"*").c_str(), &FileData);
- if ( hFile == INVALID_HANDLE_VALUE )
- {
- //No files !
- return false;
- }
-
- if( strncmp(FileData.cFileName, ".", 1) != 0 )
- filenames.push_back( dPath+FileData.cFileName );
- while( FindNextFile(hFile, &FileData ) != 0)
- {
- if( strncmp(FileData.cFileName, ".", 1) != 0 )
- filenames.push_back( dPath+FileData.cFileName );
- }
- return true;
- }
-
-#else
- #include <dirent.h>
-
- int GetDir(std::string dPath, std::list<std::string> &filenames)
- {
- DIR *dir = opendir( dPath.c_str() );
- if (dir == NULL)
- return false;
- struct dirent *entry;
- while((entry = readdir(dir)) != NULL)
- {
- // if( strncmp(entry->d_name, ".", 1) != 0 && strncmp(entry->d_name, "..", 2) != 0)
- if( strncmp(entry->d_name, ".", 1) != 0 )
- {
- filenames.push_back( dPath + "/" + entry->d_name );
- }
- }
- closedir(dir);
- return true;
- }
-
-#endif*/
-
//-----------------------------------------------------------------------------
// gdcmHeaderHelper
//-----------------------------------------------------------------------------
/**
* \ingroup gdcmHeaderHelper
* \brief gets the info from 0028,0030 : Pixel Spacing
- * \ else 1.
+ * else 1.
* @return X dimension of a pixel
*/
float gdcmHeaderHelper::GetXSpacing() {
/**
* \ingroup gdcmHeaderHelper
* \brief gets the info from 0028,0030 : Pixel Spacing
- * \ else 1.
+ * else 1.
* @return Y dimension of a pixel
*/
float gdcmHeaderHelper::GetYSpacing() {
/**
*\ingroup gdcmHeaderHelper
*\brief gets the info from 0018,0088 : Space Between Slices
- *\ else from 0018,0050 : Slice Thickness
- *\ else 1.
+ * else from 0018,0050 : Slice Thickness
+ * else 1.
* @return Z dimension of a voxel-to be
*/
float gdcmHeaderHelper::GetZSpacing() {
/**
* \ingroup gdcmHeaderHelper
* \brief This function is intended to user who doesn't want
- * \ to have to manage a LUT and expects to get an RBG Pixel image
- * \ (or a monochrome one ...)
+ * to have to manage a LUT and expects to get an RBG Pixel image
+ * (or a monochrome one ...)
* \warning to be used with GetImagePixels()
* @return 1 if Gray level, 3 if Color (RGB, YBR or PALETTE COLOR)
*/
/**
* \ingroup gdcmHeaderHelper
* \brief gets the info from 0020,0032 : Image Position Patient
- *\ else from 0020,0030 : Image Position (RET)
- *\ else 0.
+ * else from 0020,0030 : Image Position (RET)
+ * else 0.
* @return up-left image corner X position
*/
/**
* \ingroup gdcmHeaderHelper
* \brief gets the info from 0020,0032 : Image Position Patient
- * \ else from 0020,0030 : Image Position (RET)
- * \ else 0.
+ * else from 0020,0030 : Image Position (RET)
+ * else 0.
* @return up-left image corner Y position
*/
float gdcmHeaderHelper::GetYOrigin() {
* \ingroup gdcmParser
* \brief Determines if the Transfer Syntax was already encountered
* and if it corresponds to a ImplicitVRLittleEndian one.
- *
* @return True when ImplicitVRLittleEndian found. False in all other cases.
*/
bool gdcmParser::IsImplicitVRLittleEndianTransferSyntax(void) {
* \ingroup gdcmParser
* \brief Determines if the Transfer Syntax was already encountered
* and if it corresponds to a ExplicitVRLittleEndian one.
- *
* @return True when ExplicitVRLittleEndian found. False in all other cases.
*/
bool gdcmParser::IsExplicitVRLittleEndianTransferSyntax(void) {
* \ingroup gdcmParser
* \brief Determines if the Transfer Syntax was already encountered
* and if it corresponds to a DeflatedExplicitVRLittleEndian one.
- *
* @return True when DeflatedExplicitVRLittleEndian found. False in all other cases.
*/
bool gdcmParser::IsDeflatedExplicitVRLittleEndianTransferSyntax(void) {
* \ingroup gdcmParser
* \brief Determines if the Transfer Syntax was already encountered
* and if it corresponds to a Explicit VR Big Endian one.
- *
* @return True when big endian found. False in all other cases.
*/
bool gdcmParser::IsExplicitVRBigEndianTransferSyntax(void) {
* \ingroup gdcmParser
* \brief returns the File Type
* (ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown)
- * @return
+ * @return the FileType code
*/
FileType gdcmParser::GetFileType(void) {
return(filetype);
* @param Value passed as a std::string
* @param Group
* @param Elem
- * \return boolean
+ * \return false only if new element creation fails
*/
bool gdcmParser::ReplaceOrCreateByNumber(std::string Value,
guint16 Group,
* \brief Modifies the value of a given Header Entry (Dicom Element)
* if it exists; Creates it with the given value if it doesn't
* @param Value passed as a char*
- * @param Group
- * @param Elem
+ * @param Group group of the Entry
+ * @param Elem element of the Entry
* \return boolean
*
*/
* \ingroup gdcmParser
* \brief Set a new value if the invoked element exists
* Seems to be useless !!!
- * @param Value
- * @param Group
- * @param Elem
+ * @param Value new element value
+ * @param Group group of the Entry
+ * @param Elem element of the Entry
* \return boolean
*/
bool gdcmParser::ReplaceIfExistByNumber(char* Value, guint16 Group, guint16 Elem )
//-----------------------------------------------------------------------------
// Protected
+
/**
* \ingroup gdcmParser
* \brief Checks if a given Dicom Element exists
- * \ within the H table
+ * within the H table
* @param group Group number of the searched Dicom Element
* @param element Element number of the searched Dicom Element
* @return number of occurences
if ( ! tagHT.count(key))
return false;
int l = content.length();
- if(l%2) // Odd length are padded with a space (020H).
+ if(l%2) // Non even length are padded with a space (020H).
{
l++;
content = content + '\0';
* through it's (group, element) and modifies it's length with
* the given value.
* \warning Use with extreme caution.
- * @param length new length to substitute with
- * @param group group of the entry to modify
- * @param element element of the Entry to modify
+ * @param l new length to substitute with
+ * @param group group of the Entry to modify
+ * @param element element of the Entry to modify
* @return 1 on success, 0 otherwise.
*/
-bool gdcmParser::SetEntryLengthByNumber(guint32 length,
+bool gdcmParser::SetEntryLengthByNumber(guint32 l,
guint16 group,
guint16 element)
{
TagKey key = gdcmDictEntry::TranslateToKey(group, element);
if ( ! tagHT.count(key))
return false;
- if (length%2) length++; // length must be even
- ( ((tagHT.equal_range(key)).first)->second )->SetLength(length);
+ if (l%2) l++; // length must be even
+ ( ((tagHT.equal_range(key)).first)->second )->SetLength(l);
return true ;
}
/**
* \ingroup gdcmParser
* \brief Gets (from Header) the offset of a 'non string' element value
- * \ (LoadElementValues has already be executed)
- * @param Group
- * @param Elem
+ * (LoadElementValues has already be executed)
+ * @param Group group of the Entry
+ * @param Elem element of the Entry
* @return File Offset of the Element Value
*/
size_t gdcmParser::GetEntryOffsetByNumber(guint16 Group, guint16 Elem)
/**
* \ingroup gdcmParser
* \brief Gets (from Header) a 'non string' element value
- * \ (LoadElementValues has already be executed)
- * @param Group
- * @param Elem
+ * (LoadElementValues has already be executed)
+ * @param Group group of the Entry
+ * @param Elem element of the Entry
* @return Pointer to the 'non string' area
*/
void * gdcmParser::GetEntryVoidAreaByNumber(guint16 Group, guint16 Elem)
* \ingroup gdcmParser
* \brief Loads (from disk) the element content
* when a string is not suitable
- * @param Group
- * @param Elem
+ * @param Group group of the Entry
+ * @param Elem element of the Entry
*/
void *gdcmParser::LoadEntryVoidArea(guint16 Group, guint16 Elem)
{
/**
* \ingroup gdcmParser
- * \brief Update the entries with the shadow dictionary. Only odd entries are
- * analized
+ * \brief Update the entries with the shadow dictionary.
+ * Only non even entries are analyzed
*/
void gdcmParser::UpdateShaEntries(void) {
gdcmDictEntry *entry;
/**
* \ingroup gdcmParser
* \brief retrieves a Dicom Element (the first one) using (group, element)
- * \ warning (group, element) IS NOT an identifier inside the Dicom Header
+ * \warning (group, element) IS NOT an identifier inside the Dicom Header
* if you think it's NOT UNIQUE, check the count number
* and use iterators to retrieve ALL the Dicoms Elements within
* a given couple (group, element)
/**
* \ingroup gdcmParser
* \brief writes on disc according to the requested format
- * \ (ACR-NEMA, ExplicitVR, ImplicitVR) the image
- * \ 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!)
+ * (ACR-NEMA, ExplicitVR, ImplicitVR) the image
+ * \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!)
* @param type type of the File to be written
* (ACR-NEMA, ExplicitVR, ImplicitVR)
* @param _fp already open file pointer
* \brief add a new Dicom Element pointer to
* the H Table and to the chained List
* \warning push_bash in listEntries ONLY during ParseHeader
- * \TODO something to allow further Elements addition,
- * \ when position to be taken care of
+ * \todo something to allow further Elements addition,
+ * (at their right place in the chained list)
+ * when position to be taken care of
* @param newHeaderEntry
*/
void gdcmParser::AddHeaderEntry(gdcmHeaderEntry *newHeaderEntry) {
* \ingroup gdcmParser
* \brief
* @param Entry Header Entry whose length of the value shall be loaded.
-
* @return
*/
void gdcmParser::FindHeaderEntryLength (gdcmHeaderEntry *Entry) {
* \brief Check the correspondance between the VR of the header entry
* and the taken VR. If they are different, the header entry is
* updated with the new VR.
- * @param Entry
- * @param vr
+ * @param Entry Header Entry to check
+ * @param vr Dicom Value Representation
* @return false if the VR is incorrect of if the VR isn't referenced
* otherwise, it returns true
*/
/**
* \ingroup gdcmParser
* \brief
- *
+ * \warning NOT end user intended method !
* @return
*/
guint32 gdcmParser::FindHeaderEntryLengthOB(void) {
/**
* \ingroup gdcmParser
* \brief Reads a supposed to be 16 Bits integer
- * \ (swaps it depending on processor endianity)
- *
+ * (swaps it depending on processor endianity)
* @return read value
*/
guint16 gdcmParser::ReadInt16(void) {
/**
* \ingroup gdcmParser
* \brief Reads a supposed to be 32 Bits integer
- * \ (swaps it depending on processor endianity)
- *
+ * (swaps it depending on processor endianity)
* @return read value
*/
guint32 gdcmParser::ReadInt32(void) {
/**
* \ingroup gdcmParser
* \brief
- *
+ * \warning NOT end user intended method !
* @return
*/
void gdcmParser::SkipBytes(guint32 NBytes) {
/**
* \ingroup gdcmParser
- * \brief
+ * \brief during parsing, Header Elements too long are not loaded in memory
* @param NewSize
*/
void gdcmParser::SetMaxSizeLoadEntry(long NewSize)
/**
* \ingroup gdcmParser
- * \brief
- * \warning TODO : not yet usable
+ * \brief Header Elements too long will not be printed
+ * \warning
+ * \todo : not yet usable
* (see MAX_SIZE_PRINT_ELEMENT_VALUE
* in gdcmHeaderEntry gdcmLoadEntry)
*
* \ingroup gdcmParser
* \brief Request a new virtual dict entry to the dict set
* @param group group of the underlying DictEntry
- * @param elem element of the underlying DictEntry
+ * @param element element of the underlying DictEntry
* @param vr VR of the underlying DictEntry
* @param fourth owner group
* @param name english name