putAndInsertFloat64 returns error condition

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Silvermaul
Posts: 31
Joined: Thu, 2010-09-02, 10:03

putAndInsertFloat64 returns error condition

#1 Post by Silvermaul »

Hello all,

in my app I am using the following :

Code: Select all

status = DCMOD::ModificationBaseClass::getDataset()->findAndGetFloat64(DCM_IntensifierSize, this->mOrigImageIntensifierValue); // where mOrigImageIntensifierValue is a double
at some point I do some modifications and I want to write the modified value back to the file by using :

Code: Select all

mDataset->putAndInsertFloat64(DCM_IntensifierSize, newImgIntensifier_in) however this time I get an error status : Illegal call perhaps wrong parameters. // newImgIntensifier is a const double &. 
I can't see my mistake. I can modify other tags with this scheme. Any suggestions?

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

The answer is easy: IntensifierSize (0018,1162) is of type DS (Decimal String) and DcmItem::putAndInsertFloat64() is not applicable to this VR - see documentation for details.

Silvermaul
Posts: 31
Joined: Thu, 2010-09-02, 10:03

#3 Post by Silvermaul »

I know that the VR was DS. This is why I used findAndGetFloat64(...)

in the first place since in the documentation is stated that : "Applicable to the following VRs: DS, FD The result variable 'value' is automatically set to zero if an error occurs."

I assumed that the complementary function was to be used in order to set the tag. Could anyone point me to a page which explains the VR abbreviations? I have the latest dicom standard in front of me and I am looking at "Registry of DICOM data elements" but I don't know where exactly to look for.

Thanks again Jörg for your help and your tool :)

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

Table 6.2-1 in part 5 of the DICOM standard is your friend :-)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest