How to get scan arc info (and other dicom info) in imagej plugin

I face the problem of reading the file info of a SPECT image to get the scan arc info. When i press Ctrl+I i can get in the line 0018,1143 >Scan Arc: 360 .

How can I get this (or any other dicom info) in a java plugin??

Regards

Does the bioformats library gives you the required information?. See:

http://www.openmicroscopy.org/site/support/bio-formats5.1/formats/dicom.html

http://www.openmicroscopy.org/site/support/bio-formats5.1/supported-formats.html

Not so helpfull, can you refer to a basic example where you get the dicom info in a plugin

Here are some additional links:

http://imagej.1557.x6.nabble.com/Accessing-a-DICOM-header-td4898551.html

This paper might be a help,too:

https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0ahUKEwi0j5PFu5jNAhXLESwKHSuvCEkQFghDMAQ&url=http%3A%2F%2Fwww.santec.lu%2F_media%2Fproject%2Fdicom%2Ftudor_dicom_ijconf2008_paper.pdf&usg=AFQjCNHppUPlZ2Nd4P9zNAUzW5YARpzDiw

I would also ask in the OME forum:

https://www.openmicroscopy.org/community/viewforum.php?f=12

I ended writing my own dicom parser, see https://github.com/BishopWolf/NMQC/blob/master/src/main/java/NMQC/C_O_R.java#L71

You can get the value of a DICOM tag using the ImagePlus.getStringProperty() method. Here is a JavaScript example:

tag = "0018,1143";
img = IJ.openImage("http://wsr.imagej.net/images/ct.dcm.zip");
value = img.getStringProperty(tag);
IJ.log(tag+": "+value);
2 Likes

I tried that but using IJ.log(value); it returned: >Scan Arc: 360

So I have to modify the getStringProperty code to extract the real Scan Arc value. My code returns 360, and thats what I expected