DCM_WindowCenter NULL

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

DCM_WindowCenter NULL

#1 Post by mesajflaviu »

I have some series mamo, which are multiframe, and DCM_WindowCenter and DCM_WindowWidth are read NULL ... what values should I put into my app in order to see the image correctly ? Before I read DCM_WindowCenter NULL, I have read getMinMaxValues, which is 4096 ... also, I read other tags, like DCM_VOILUTSequence, which are also NULL ... is there a way to get these values, as long they are NULL ?

Thank you.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DCM_WindowCenter NULL

#2 Post by J. Riesmeier »

What is the SOP Class UID (or Name) of your images?

mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

Re: DCM_WindowCenter NULL

#3 Post by mesajflaviu »

Kindly thank you for your concern.
I have teste what you said, and here is the results:

Code: Select all

DCM_SOPClassUID: 1.2.840.10008.5.1.4.1.1.13.1.3
DCM_SOPInstanceUID: 1.2.276.0.69.22.29.3056.2500.20161208120518563282.41
DCM_SequenceName: NULL
DCM_ProtocolName: 3D_ROUTINE
DCM_DataSetName: NULL
DCM_ProductName: NULL
but I noticed something interesting: the series that has DCM_WindowCenter and DCM_WindowWidth not NULL, the DCM_ProtocolName has ROUTINE, not 3D_ROUTINE ... what is the difference ?

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DCM_WindowCenter NULL

#4 Post by J. Riesmeier »

This SOP Class is not a conventional "mammo image" but a Breast Tomosynthesis Image object.​ As you can read in Section A.55.3.1.1 of DICOM Part 3: "The VOI LUT function is provided by a Frame VOI LUT Functional Group." That means there is no Window Center/Width or the like on the top-level of the dataset but nested in a sequence...

mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

Re: DCM_WindowCenter NULL

#5 Post by mesajflaviu »

The strange thing is that when DCM_WindowWidth and DCM_WindowCenter is NULL then DCM_VOILUTFunction, DCM_VOILUTSequence, DCM_LUTDescriptor, DCM_LUTExplanation, DCM_LUTData, DCM_FrameVOILUTSequence are all NULL ... I have to dig in ...

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DCM_WindowCenter NULL

#6 Post by J. Riesmeier »

The Frame VOI LUT Sequence is not contained on the main dataset level but in the "Frame VOI LUT with LUT Macro", which is part of the Shared or Per-frame Functional Groups Sequence. See DICOM Part 3 for details.

mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

Re: DCM_WindowCenter NULL

#7 Post by mesajflaviu »

I have found with dcmdump following tags:

Code: Select all

  (0028,9132) SQ (Sequence with explicit length #=1)      #  96, 1 FrameVOILUTSequence
      (fffe,e000) na (Item with explicit length #=4)          #  88, 1 Item
        (0028,1050) DS [2803\2869\2707]                         #  14, 3 WindowCenter
        (0028,1051) DS [1250\1000\1500]                         #  14, 3 WindowWidth
        (0028,1055) LO [NORMAL\HARDER\SOFTER]                   #  20, 3 WindowCenterWidthExplanation
        (0028,1056) CS [SIGMOID]                                #   8, 1 VOILUTFunction
      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
although when I read

Code: Select all

pDS->findAndGetString(DCM_FrameVOILUTSequence, pszValue);
I get NULL from pszValue ... I feel I am not far ... I don't know how to read successfully DCM_FrameVOILUTSequence ...

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DCM_WindowCenter NULL

#8 Post by J. Riesmeier »

A Sequence of Items (VR=SQ) is not a String, and findAndGetString() is not applicable to this VR as the documentation shows. You could use findAndGetSequence() or findAndGetSequenceItem() for this purpose, but as I said: the Frame VOI LUT Sequence is not part of the main dataset (i.e. contained in a sequence item), so you need to go down step by step.

mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

Re: DCM_WindowCenter NULL

#9 Post by mesajflaviu »

Thank again ! I have found the real window/level, and I understand how to retrieve it:

Code: Select all

   DcmItem* pItem = NULL;
   if(pDS->findAndGetSequenceItem(DCM_SharedFunctionalGroupsSequence, pItem).good())
		if(pDS->findAndGetSequenceItem(DCM_Item, pItem).good())
			if(pDS->findAndGetSequenceItem(DCM_FrameVOILUTSequence, pItem).good())
				if(pDS->findAndGetSequenceItem(DCM_Item, pItem).good())
					if(pDS->findAndGetSequenceItem(DCM_WindowWidth, pItem).good())
						pDS->findAndGetString(DCM_WindowWidth, pszValue);
the problem is that this code is functional only on first if (which are TRUE)

Code: Select all

   if(pDS->findAndGetSequenceItem(DCM_SharedFunctionalGroupsSequence, pItem).good())
The next one is FALSE:

Code: Select all

if(pDS->findAndGetSequenceItem(DCM_Item, pItem).good())
I don't know why ... although DCM_Item is present on dataset (I have checked with dcmdump ...
I have inspired from here:
http://support.dcmtk.org/redmine/projec ... quenceItem
but it's only one level ...
Last edited by mesajflaviu on Tue, 2016-12-20, 14:57, edited 1 time in total.

mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

Re: DCM_WindowCenter NULL

#10 Post by mesajflaviu »

I also tried:

Code: Select all

   DcmItem* pItem = NULL;
   if(pDS->findAndGetSequenceItem(DCM_SharedFunctionalGroupsSequence, pItem).good())
//		if(pDS->findAndGetSequenceItem(DCM_Item, pItem).good())
			if(pDS->findAndGetSequenceItem(DCM_FrameVOILUTSequence, pItem).good())
				if(pDS->findAndGetSequenceItem(DCM_Item, pItem).good())
					if(pDS->findAndGetSequenceItem(DCM_WindowWidth, pItem).good())
						pDS->findAndGetString(DCM_WindowWidth, pszValue);
this if is TRUE:

Code: Select all

if(pDS->findAndGetSequenceItem(DCM_SharedFunctionalGroupsSequence, pItem).good())
but next one is FALSE:

Code: Select all

if(pDS->findAndGetSequenceItem(DCM_FrameVOILUTSequence, pItem).good())

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DCM_WindowCenter NULL

#11 Post by J. Riesmeier »

It is "FALSE" since the Frame VOI LUT Sequence is not contained in "pDS" but in "pItem", i.e. in the nested dataset. The same applies to Window Width, which is again nested...

mesajflaviu
Posts: 16
Joined: Mon, 2016-12-05, 10:00

Re: DCM_WindowCenter NULL

#12 Post by mesajflaviu »

Forgive my ignorance, I will try your advice.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest