org.dcm4che2.hp
Class HPSelectorFactory

java.lang.Object
  extended by org.dcm4che2.hp.HPSelectorFactory

public class HPSelectorFactory
extends java.lang.Object

Since:
Jul 30, 2005
Version:
$Revision: 14188 $ $Date: 2010-10-21 10:36:22 +0200 (Thu, 21 Oct 2010) $
Author:
gunter zeilinger(gunterze@gmail.com)

Field Summary
static int FRAME_INDEX
          Selector Value Number constant for indicating that the frame number shall be used for indexing the value of the Selector Attribute for filtering.
 
Constructor Summary
HPSelectorFactory()
           
 
Method Summary
static HPSelector addFunctionalGroupPointer(java.lang.String privCreator, int tag, HPSelector selector)
          Decorate Image Set Filter or Display Set Filter with Functional Group Pointer, defining the Selector Attribute as nested in a Functional Group Sequence.
static HPSelector addSequencePointer(java.lang.String privCreator, int tag, HPSelector selector)
          Decorate Image Set Filter or Display Set Filter with Selector Sequence Pointer, defining the Selector Attribute as nested in a Sequence.
static HPSelector createAttributePresenceSelector(java.lang.String privateCreator, int tag, java.lang.String filter)
          Create Display Set Filter with Filter-by Attribute Presence.
static HPSelector createAttributeValueSelector(java.lang.String privateCreator, int tag, int valueNumber, double[] values, FilterOp filterOp)
          Create Display Set Filter with double Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String privateCreator, int tag, int valueNumber, VR vr, float[] values, FilterOp filterOp)
          Create Display Set Filter with float Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String privateCreator, int tag, int valueNumber, VR vr, int[] values, FilterOp filterOp)
          Create Display Set Filter with int Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String privateCreator, int tag, int valueNumber, VR vr, java.lang.String[] values, FilterOp filterOp)
          Create Display Set Filter with String Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String usageFlag, java.lang.String privateCreator, int tag, int valueNumber, double[] values)
          Create Image Set Selector with double Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String usageFlag, java.lang.String privateCreator, int tag, int valueNumber, VR vr, float[] values)
          Create Image Set Selector with float Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String usageFlag, java.lang.String privateCreator, int tag, int valueNumber, VR vr, int[] values)
          Create Image Set Selector with int Selector Attribute Values.
static HPSelector createAttributeValueSelector(java.lang.String usageFlag, java.lang.String privateCreator, int tag, int valueNumber, VR vr, int[] values, FilterOp filterOp)
          Create Display Set Filter with int Selector Attribute Values and specified Image Set Selector Usage Flag (0072,0024).
static HPSelector createAttributeValueSelector(java.lang.String usageFlag, java.lang.String privateCreator, int tag, int valueNumber, VR vr, java.lang.String[] values)
          Create Image Set Selector with String Selector Attribute Values.
static HPSelector createCodeValueSelector(java.lang.String privateCreator, int tag, int valueNumber, Code[] values, FilterOp filterOp)
          Create Display Set Filter with Code Selector Attribute Values.
static HPSelector createCodeValueSelector(java.lang.String usageFlag, java.lang.String privateCreator, int tag, int valueNumber, Code[] values)
          Create Image Set Selector with Code Selector Attribute Values.
static HPSelector createDisplaySetFilter(DicomObject item)
          Create Display Set Filter from Filter Operations Sequence (0072,0400) item.
static HPSelector createImagePlaneSelector(ImagePlane[] imagePlanes)
          Create Display Set Filter with Filter-by Category IMAGE_PLANE.
static HPSelector createImageSetSelector(DicomObject item)
          Create Image Set Selector from Image Set Selector Sequence (0072,0022) item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRAME_INDEX

public static final int FRAME_INDEX
Selector Value Number constant for indicating that the frame number shall be used for indexing the value of the Selector Attribute for filtering.

See Also:
Constant Field Values
Constructor Detail

HPSelectorFactory

public HPSelectorFactory()
Method Detail

createImageSetSelector

public static HPSelector createImageSetSelector(DicomObject item)
Create Image Set Selector from Image Set Selector Sequence (0072,0022) item. The created Image Set Selector is backed by the given item DicomObject.

Parameters:
item - DicomObject of Image Set Selector Sequence (0072,0022)
Returns:
the new Image Set Selector

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String usageFlag,
                                                      java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      java.lang.String[] values)
Create Image Set Selector with String Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
usageFlag - CodeString.MATCH or CodeString.NO_MATCH
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: CS, LO, LT, PN, SH, ST or UT
values - Selector Values
Returns:
new Image Set Selector

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String usageFlag,
                                                      java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      int[] values)
Create Image Set Selector with int Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
usageFlag - CodeString.MATCH or CodeString.NO_MATCH
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: AT, IS, SL, SS, UL, or US
values - Selector Values
Returns:
new Image Set Selector

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String usageFlag,
                                                      java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      float[] values)
Create Image Set Selector with float Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
usageFlag - CodeString.MATCH or CodeString.NO_MATCH
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: DS or FL
values - Selector Values
Returns:
new Image Set Selector

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String usageFlag,
                                                      java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      double[] values)
Create Image Set Selector with double Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
usageFlag - CodeString.MATCH or CodeString.NO_MATCH
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
values - Selector Values
Returns:
new Image Set Selector

createCodeValueSelector

public static HPSelector createCodeValueSelector(java.lang.String usageFlag,
                                                 java.lang.String privateCreator,
                                                 int tag,
                                                 int valueNumber,
                                                 Code[] values)
Create Image Set Selector with Code Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
usageFlag - CodeString.MATCH or CodeString.NO_MATCH
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
values - Selector Values
valueNumber - Selector Value Number
Returns:
new Image Set Selector

createDisplaySetFilter

public static HPSelector createDisplaySetFilter(DicomObject item)
Create Display Set Filter from Filter Operations Sequence (0072,0400) item. The created Display Set Filter is backed by the given item DicomObject.

Parameters:
item - DicomObject of Filter Operations Sequence (0072,0400)
Returns:
the new Display Set Filter

createImagePlaneSelector

public static HPSelector createImagePlaneSelector(ImagePlane[] imagePlanes)
Create Display Set Filter with Filter-by Category IMAGE_PLANE. A new DicomObject, representing the according Filter Operations Sequence (0072,0400) item, is allocated and initialized.

Parameters:
imagePlanes - array of matching image planes.
Returns:
new Display Set Filter

createAttributePresenceSelector

public static HPSelector createAttributePresenceSelector(java.lang.String privateCreator,
                                                         int tag,
                                                         java.lang.String filter)
Create Display Set Filter with Filter-by Attribute Presence. A new DicomObject, representing the according Filter Operations Sequence (0072,0400) item, is allocated and initialized.

Parameters:
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
filter - "PRESENT" or "NOT_PRESENT"
Returns:
new Display Set Filter

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      java.lang.String[] values,
                                                      FilterOp filterOp)
Create Display Set Filter with String Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: CS, LO, LT, PN, SH, ST or UT
values - Selector Values
filterOp - Filter-by Operator
Returns:
new Display Set Filter

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      int[] values,
                                                      FilterOp filterOp)
Create Display Set Filter with int Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: AT, IS, SL, SS, UL, or US
values - Selector Values
filterOp - Filter-by Operator
Returns:
new Display Set Filter

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      float[] values,
                                                      FilterOp filterOp)
Create Display Set Filter with float Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: DS or FL
values - Selector Values
filterOp - Filter-by Operator
Returns:
new Display Set Filter

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      double[] values,
                                                      FilterOp filterOp)
Create Display Set Filter with double Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
values - Selector Values
filterOp - Filter-by Operator
Returns:
new Display Set Filter

createCodeValueSelector

public static HPSelector createCodeValueSelector(java.lang.String privateCreator,
                                                 int tag,
                                                 int valueNumber,
                                                 Code[] values,
                                                 FilterOp filterOp)
Create Display Set Filter with Code Selector Attribute Values. A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item, is allocated and initialized.

Parameters:
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
values - Selector Values
filterOp - Filter-by Operator
Returns:
new Display Set Filter

addSequencePointer

public static HPSelector addSequencePointer(java.lang.String privCreator,
                                            int tag,
                                            HPSelector selector)
Decorate Image Set Filter or Display Set Filter with Selector Sequence Pointer, defining the Selector Attribute as nested in a Sequence. If the Sequence is itself nested in a Frunctional Group Sequence, the returned HPComparator has to be additional decorated by addFunctionalGroupPointer(java.lang.String, int, org.dcm4che2.hp.HPSelector). The associated DicomObject is updated correspondingly. If tag = 0, the given Image Set Filter or Display Set Filter is returned unmodified.

Parameters:
privateCreator - Selector Sequence Pointer Private Creator, if Selector Sequence Pointer is contained by a Private Group, otherwise null.
tag - Selector Sequence Pointer
selector - Image Set Filter or Display Set Filter to decorate
Returns:
decorated Image Set Filter or Display Set Filter

addFunctionalGroupPointer

public static HPSelector addFunctionalGroupPointer(java.lang.String privCreator,
                                                   int tag,
                                                   HPSelector selector)
Decorate Image Set Filter or Display Set Filter with Functional Group Pointer, defining the Selector Attribute as nested in a Functional Group Sequence. The associated DicomObject is updated correspondingly. If tag = 0, the given Image Set Filter or Display Set Filter is returned unmodified.

Parameters:
privateCreator - Functional Group Private Creator, if Functional Group Pointer is contained by a Private Group, otherwise null.
tag - Functional Group Pointer
selector - Image Set Filter or Display Set Filter to decorate
Returns:
decorated Image Set Filter or Display Set Filter

createAttributeValueSelector

public static HPSelector createAttributeValueSelector(java.lang.String usageFlag,
                                                      java.lang.String privateCreator,
                                                      int tag,
                                                      int valueNumber,
                                                      VR vr,
                                                      int[] values,
                                                      FilterOp filterOp)
Create Display Set Filter with int Selector Attribute Values and specified Image Set Selector Usage Flag (0072,0024). A new DicomObject, representing the according Image Set Selector Sequence (0072,0022) item is allocated and initialized.

Parameters:
usageFlag - CodeString.MATCH or CodeString.NO_MATCH or null
privateCreator - Selector Attribute Private Creator, if Selector Attribute is contained by a Private Group, otherwise null.
tag - Selector Attribute
valueNumber - Selector Value Number
vr - Selector Attribute VR: AT, IS, SL, SS, UL, or US
values - Selector Values
filterOp - Filter-by Operator
Returns:
new Display Set Filter


Copyright © 2011 dcm4che. All Rights Reserved.