How to get value as EVR_SS from EVR_UNKNOWN element
Moderator: Moderator Team
-
- Posts: 4
- Joined: Fri, 2005-01-14, 05:40
How to get value as EVR_SS from EVR_UNKNOWN element
Hi to everyone !!
I want to get value as EVR_SS, EVR_FD, and EVR_PN from EVR_UNKNOWN element.
Any idea that could help me ??
Shingo Satou
I want to get value as EVR_SS, EVR_FD, and EVR_PN from EVR_UNKNOWN element.
Any idea that could help me ??
Shingo Satou
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 4
- Joined: Fri, 2005-01-14, 05:40
I'm developing the viewer software that can read DICOM files of various manufacturers.
When DICOM files of a manufacturer is read, private tag is included in that.
For this case, all the tag numbers cannot be anticipated beforehand.
Therefore, all the tag numbers cannot be written in "Private.dic" file beforehand.
Then, I want to get value from EVR_UNKNOWN element by EVR_SS, EVR_FD, and EVR_PN form.
However, getOFString() doesn't operate normally.
Any idea that could help me ??
When DICOM files of a manufacturer is read, private tag is included in that.
For this case, all the tag numbers cannot be anticipated beforehand.
Therefore, all the tag numbers cannot be written in "Private.dic" file beforehand.
Then, I want to get value from EVR_UNKNOWN element by EVR_SS, EVR_FD, and EVR_PN form.
Code: Select all
Example:
void DisplayUnknown(DcmElement *UnknownObject, DcmEVR FormatVR)
{
switch(FormatVR)
{
case EVR_FL:
{
Float32 Val = 0.0;
UnknownObject->getFloat32(Val, 0);
printf(%f, Val);
}
break;
case EVR_UI:
{
OFString Val = "";
UnknownObject->getOFString(Val, 0);
printf(%s, Val);
}
break;
/* code for other VRs */
}
}
Any idea that could help me ??
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
As you can see in the source code data elements with unknown VR are mapped to either DcmOtherByteOtherWord or DcmSequenceOfItems (depending on the value of the length attribute).
Nevertheless, my question still remains: how do you know to which VR you want to map the unknown VR if you do not know the private attribute? Maybe I'm missing something.
Nevertheless, my question still remains: how do you know to which VR you want to map the unknown VR if you do not know the private attribute? Maybe I'm missing something.
-
- Posts: 4
- Joined: Fri, 2005-01-14, 05:40
I don't know VR of private tag, and I want to get value
guessing that VR is SS, FD, and PN.
If processing that helps it exists in DCMTK, I want to use it.
Value example:
guessing that VR is SS, FD, and PN.
If processing that helps it exists in DCMTK, I want to use it.
Value example:
- 0x48 0x45 0x4c 0x4c 0x4f 0x21 0x21 0x21
- If this VR is SS, the value is [17736 19532 8527 8481].
If this VR is FD, the value is [4.187e-1497].
If this VR is PN, the value is [HELLO!!!].
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
There is no support for guessing the VR of an unknown data element in DCMTK and I doubt that it is possible to find a general solution for this problem. For example, how would you determine that the guessed VR is correct - I mean automatically.
If the unknown data element is stored as a DcmOtherByteOtherWord you could access the binary information directly using the appropriate getXXX() method and apply your own heuristics to this value.
If the unknown data element is stored as a DcmOtherByteOtherWord you could access the binary information directly using the appropriate getXXX() method and apply your own heuristics to this value.
-
- Posts: 4
- Joined: Fri, 2005-01-14, 05:40
Who is online
Users browsing this forum: No registered users and 1 guest