Get TAG of value multiplicity (VM) greater than 1

70 views
Skip to first unread message

Thanasis Iliopoulos

unread,
Jun 2, 2015, 11:00:32 AM6/2/15
to dcm...@googlegroups.com

My question is somehow simple.

I want to get all the values from a TAG of VM>1.

For example the (0018,1310) tag, named Acquisition Matrix is of VM=4, so it stores 4 values separated by dash like:

0/320/192/0

I want to read all values stored in this TAG, but if i use:

...
acquisitionMatrix = dcmObj.getString(Tag.AcquisitionMatrix);
....

i only get the first! How can i achieve this?

Trig Chen

unread,
Jun 3, 2015, 12:21:59 AM6/3/15
to dcm...@googlegroups.com
Please try:

final String file = "...../IM0001.dcm";
                final DicomInputStream dcm = new DicomInputStream(new File(file));
final Attributes atts = dcm.readDataset(-1, -1);
dcm.close();
final int[] matrix = atts.getInts(Tag.AcquisitionMatrix);
System.out.println(Arrays.toString(matrix));

tested with dcm4che3.x.


Reply all
Reply to author
Forward
0 new messages