Login  Register

Re: Some DICOM questions

Posted by Curtis Rueden on Aug 31, 2018; 6:43pm
URL: http://imagej.273.s1.nabble.com/Some-DICOM-questions-tp5021144p5021147.html

Hi Stein,

> Is there any easy way to get returned the DICOM tag name
> as a string if I only know the DICOM tag number?

SCIFIO's implementation of DICOM has the ability to retrieve a tag name
from its ID.  Here is an example Groovy script:

  dict = new io.scif.formats.dicom.DICOMDictionary()
  studyDescName = dict.name(0x00081030)
  println(studyDescName)

Which prints:

  Study Description

To use this from the macro language would require clever usage of eval or
call.

As an aside: the wiki page https://imagej.net/DICOM is intended to house
DICOM tips, tricks and FAQs all in one place -- please add your knowledge
there.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? https://forum.image.sc/



On Fri, Aug 31, 2018 at 9:14 AM Stein Rørvik <[hidden email]> wrote:

> From previous examples posted to this list,
> we can read DICOM tags in a macro like this:
>
> open("http://imagej.nih.gov/ij/images/ct.dcm.zip");
> studyDescription = getInfo("0008,1030");
> print("Study Description: "+ studyDescription);
>
> This works fine.
> If we select Show Info, the corresponding line is listed like this:
> 0008,1030  Study Description: TEMP BONE/ST NECK W
>
> My question is:
> Is there any easy way to get returned the DICOM tag name (in the above
> example "Study Description")
> as a string if I only know the DICOM tag number?
>
> What I want to do is something similar to this:
> DicomTag = "0008,1030";
> tagValue = getDicomTagValue(DicomTag);
> tagName = getDicomTagName(DicomTag);
> print("DICOM Tag Name: "+ tagName);
> print("DICOM Tag Value: "+ tagValue);
>
> Another question, for those who work with medical data:
>
> If I have a DICOM three node of various scans done at the same MRI
> investigation,
> do any of the DICOM tags describe where the scans are located in the
> patient?
> That is, some kind of patient coordinate system that is the same for all
> scan?
> (assuming that the patient was not moved, of course)
>
> What I want to do is to select a certain point of interest in the patient,
> and create X Y Z orthoviews of the same location in all scans.
> Since I have no expertise in radiology, locating the same structure
> visually is not so
> easy as the scans are done with different contrast methods and aligned at
> different angles.
>
> If there is some kind of patient coordinate system in the DICOM tags,
> I could calculate the corresponding pixel in each stack and do a reslice
> along each axis through that point.
>
> Stein
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html