Value Multiplicity (VM)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Lauper
Posts: 3
Joined: Tue, 2006-01-17, 16:46

Value Multiplicity (VM)

#1 Post by Lauper »

Let's say there are several value fields in the data element "window center":
i.e. (0028,1050) WindowCenter: [749] [1023]

I want to find out the VM of a certain data element (in the above example: 2).

There exists a getVM()-function in the DcmItem class (implements DcmObject), but that always returns 1 ("according to the DICOM standard").
A hack would be to use a findAndGet function and look for a special position (third paramter) and then check the OFCondition with .good()/.bad()

Is there a better way to do it?

Thanks

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 »

You could use findAndGetElement(), typecast the resulting pointer to the corresponding VR class (e.g. DcmDecimalString) and then use getVM().

Post Reply

Who is online

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