* \brief concatenates 2 guint16 (supposed to be a Dicom group number
* and a Dicom element number)
* @param group the Dicom group number used to build the tag
- * @param group the Dicom element number used to build the tag
+ * @param element the Dicom element number used to build the tag
* return the built tag
*/
TSKey v;
std::string d2;
gdcmTS * ts = gdcmGlobal::GetTS();
+
std::ostringstream s;
+
+ s << "------------- using tagHt ---------------------" << std::endl;
// Tag HT
s << "------------- using tagHt ---------------------" << std::endl;
guint32 lgth;
char greltag[10]; //group element tag
+
s << "------------ using listElem -------------------" << std::endl;
+
for (ListTag::iterator i = listElem.begin();
i != listElem.end();
++i){
* 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)
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
+ * @param group Group number of the searched Dicom Element
+ * @param element Element number of the searched Dicom Element
* @return
*/
gdcmElValue* gdcmElValSet::GetElementByNumber(guint16 group, guint16 element) {
/**
* \ingroup gdcmElValSet
* \brief Gets the value (string) of the target Dicom Element
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
+ * @param group Group number of the searched Dicom Element
+ * @param element Element number of the searched Dicom Element
* @return
*/
std::string gdcmElValSet::GetElValueByNumber(guint16 group, guint16 element) {
* \ingroup gdcmElValSet
* \brief Sets the value (string) of the target Dicom Element
* @param content string value of the Dicom Element
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
+ * @param group Group number of the searched Dicom Element
+ * @param element Element number of the searched Dicom Element
* @return
*/
bool gdcmElValSet::SetElValueByNumber(std::string content,
* \brief Sets the value length of the Dicom Element
* \warning : use with caution !
* @param length
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
+ * @param group Group number of the searched Dicom Element
+ * @param element Element number of the searched Dicom Element
* @return boolean
*/
bool gdcmElValSet::SetElValueLengthByNumber(guint32 length,
return true ;
}
-
/**
* \ingroup gdcmElValSet
* \brief Sets a 'non string' value to a given Dicom Element
* @param area
- * @param group Group number of the searched Dicom Element
- * @param elem Element number of the searched Dicom Element
+ * @param group Group number of the searched Dicom Element
+ * @param element Element number of the searched Dicom Element
* @return
*/
bool gdcmElValSet::SetVoidAreaByNumber(void * area,
* \ingroup gdcmElValSet
* \brief Checks if a given Dicom Element exists
* \ within the H table
- * @param Group Group number of the searched Dicom Element
- * @param Elem Element number of the searched Dicom Element
+ * @param group Group number of the searched Dicom Element
+ * @param element Element number of the searched Dicom Element
* @return number of occurences
*/
-int gdcmElValSet::CheckIfExistByNumber(guint16 Group, guint16 Elem ) {
- std::string key = gdcmDictEntry::TranslateToKey(Group, Elem );
+int gdcmElValSet::CheckIfExistByNumber(guint16 group, guint16 element ) {
+ std::string key = gdcmDictEntry::TranslateToKey(group, element );
return (tagHt.count(key));
}
// 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);
//-----------------------------------------------------------------------------
// Print
+
/**
* \ingroup gdcmHeader
* \brief
//-----------------------------------------------------------------------------
// Public
+
/**
* \ingroup gdcmHeader
* \brief This predicate, based on hopefully reasonable heuristics,
// use the gdcmTS (TS : Transfert Syntax)
std::string TransfertSyntax = GetPubElValByNumber(0x0002,0x0010);
if (TransfertSyntax == GDCM_UNFOUND) {
- dbg.Verbose(0, "gdcmHeader::GetTransferSyntaxName: unfound Transfert Syntax (0002,0010)");
+ dbg.Verbose(0, "gdcmHeader::GetTransfertSyntaxName: unfound Transfert Syntax (0002,0010)");
return "Uncompressed ACR-NEMA";
}
// we do it only when we need it
* \brief Loads the element content if it's length is not bigger
* than the value specified with
* gdcmHeader::SetMaxSizeLoadElementValue()
+ * @param ElVal string value of the Dicom Element
*/
void gdcmHeader::LoadElementValue(gdcmElValue * ElVal) {
size_t item_read;
fseek(fp, (long)ElVal->GetOffset(), SEEK_SET);
- // FIXME Sequences not treated yet !
- //
- // Ne faudrait-il pas au contraire trouver immediatement
- // une maniere 'propre' de traiter les sequences (vr = SQ)
- // car commencer par les ignorer risque de conduire a qq chose
- // qui pourrait ne pas etre generalisable
- // Well, I'm expecting your code !!!
-
// the test was commented out to 'go inside' the SeQuences
// we don't any longer skip them !
inline int GetSwapCode(void) { return sw; }
guint16 SwapShort(guint16); // needed by gdcmFile
guint32 SwapLong(guint32); // for JPEG Files
+
+ // was protected
+ bool ReplaceOrCreateByNumber(std::string Value, guint16 Group, guint16 Elem);
+ bool ReplaceOrCreateByNumber( char * Value, guint16 Group, guint16 Elem);
+ bool ReplaceIfExistByNumber ( char * Value, guint16 Group, guint16 Elem);
protected:
- gdcmElValue * GetElValueByNumber(guint16 group, guint16 element);
bool CheckIfExistByNumber(guint16 Group, guint16 Elem );
+ gdcmElValue * GetElValueByNumber(guint16 group, guint16 element);
int write(std::ostream&);
int anonymize(std::ostream&); // FIXME : anonymize should be a friend ?
void * GetPubElValVoidAreaByNumber(guint16 Group, guint16 Elem);
void * LoadElementVoidArea (guint16 Group, guint16 Element);
- bool ReplaceOrCreateByNumber(std::string Value, guint16 Group, guint16 Elem);
- bool ReplaceOrCreateByNumber( char * Value, guint16 Group, guint16 Elem);
- bool ReplaceIfExistByNumber ( char * Value, guint16 Group, guint16 Elem);
// Variables
FILE * fp;
*/
bool gdcmFile::ParsePixelData(void) {
// DO NOT remove the printf s.
-// The ONLY purpose of this methos is to PRINT the content
+// The ONLY purpose of this method is to PRINT the content
FILE *fp;
if ( !(fp=Header->OpenFile()))