org.dcm4che2.image
Class VOIUtils

java.lang.Object
  extended by org.dcm4che2.image.VOIUtils

public class VOIUtils
extends java.lang.Object

Since:
Aug 18, 2007
Version:
$Revision$ $Date$
Author:
Gunter Zeilinger

Constructor Summary
VOIUtils()
           
 
Method Summary
static int[] calcMinMax(DicomObject img, java.awt.image.Raster raster)
          Gets the min/max value from a data buffer, in the raw pixel data
static boolean containsVOIAttributes(DicomObject dobj)
          Return true if the specified object contains some type of VOI attributes at the current level (ie window level or VOI LUT sequence)
static DicomObject getLUT(DicomObject dobj, int sqTag)
           
static float[] getMinMaxWindowCenterWidth(DicomObject img, DicomObject pr, int frame, java.awt.image.Raster raster)
          This method returns the minimum and maximum window center widths, based on the Modality LUT and image information.
static boolean isModalityLUTcontainsPixelIntensityRelationshipLUT(DicomObject img)
          Return true if the specified image object contains a pixel intensity relationship LUT, based on SOP class
static boolean isModalityLUTcontainsPixelIntensityRelationshipLUT(java.lang.String uid)
          Return true if the specified SOP class contains a pixel intensity relationship LUT
static DicomObject selectModalityLUTObject(DicomObject img, DicomObject pr, int frame)
          Finds the applicable DicomObject containing the Modality LUT information for the given frame within the image.
static DicomObject selectVoiItemFromPr(java.lang.String iuid, DicomObject pr, int frame)
          Searches for a Softcopy VOI LUT Sequence for the given frame, or one for just the SOP instance.
static DicomObject selectVoiObject(DicomObject img, DicomObject pr, int frame)
          Finds the applicable DicomObject containing the VOI LUT information for the given frame within the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VOIUtils

public VOIUtils()
Method Detail

containsVOIAttributes

public static boolean containsVOIAttributes(DicomObject dobj)
Return true if the specified object contains some type of VOI attributes at the current level (ie window level or VOI LUT sequence)


getLUT

public static DicomObject getLUT(DicomObject dobj,
                                 int sqTag)

isModalityLUTcontainsPixelIntensityRelationshipLUT

public static boolean isModalityLUTcontainsPixelIntensityRelationshipLUT(DicomObject img)
Return true if the specified image object contains a pixel intensity relationship LUT, based on SOP class


isModalityLUTcontainsPixelIntensityRelationshipLUT

public static boolean isModalityLUTcontainsPixelIntensityRelationshipLUT(java.lang.String uid)
Return true if the specified SOP class contains a pixel intensity relationship LUT


selectModalityLUTObject

public static DicomObject selectModalityLUTObject(DicomObject img,
                                                  DicomObject pr,
                                                  int frame)
Finds the applicable DicomObject containing the Modality LUT information for the given frame within the image. Preference is to use the GSPS pr object first if it is found, then the dicom object enhanced multi-frame, and if those aren't found, then the image itself. This will always return a non-null value, although if no Modality LUT information is found whatsoever, this can contain an empty set of information.

Parameters:
img -
pr -
frame -
Returns:
The DicomObject containing the correct modality LUT information for this frame.

selectVoiObject

public static DicomObject selectVoiObject(DicomObject img,
                                          DicomObject pr,
                                          int frame)
Finds the applicable DicomObject containing the VOI LUT information for the given frame within the image. Uses the GSPS first, if a match is found for the givem SOP/frame, then SOP only, then it uses the image enahanced multi-frame, and finally the regular image information. Always returns some object to use, the img level itself if nothing else is found.

Parameters:
img -
db -
Returns:
DicomObject containing the VOI LUT to use for this frame.

selectVoiItemFromPr

public static DicomObject selectVoiItemFromPr(java.lang.String iuid,
                                              DicomObject pr,
                                              int frame)
Searches for a Softcopy VOI LUT Sequence for the given frame, or one for just the SOP instance.

Parameters:
iuid - Image UID
pr - GSPS object to select from.
frame - number. Use 0 to select any VOI applying to all frames of the UID (that is, no referenced frame number sub-object is present.)

getMinMaxWindowCenterWidth

public static float[] getMinMaxWindowCenterWidth(DicomObject img,
                                                 DicomObject pr,
                                                 int frame,
                                                 java.awt.image.Raster raster)
This method returns the minimum and maximum window center widths, based on the Modality LUT and image information. If the databuffer is missing, then no image scannign will occur for min/max pixel information, but instead the minimum/maximum possible values will be used instead.

Parameters:
img -
pr - Is the GSPS to apply to the object.
frame - is the frame number
raster -
Returns:

calcMinMax

public static int[] calcMinMax(DicomObject img,
                               java.awt.image.Raster raster)
Gets the min/max value from a data buffer, in the raw pixel data



Copyright © 2011 dcm4che. All Rights Reserved.