org.dcm4che2.hp
Class HPComparatorFactory

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

public class HPComparatorFactory
extends java.lang.Object

Since:
Aug 1, 2005
Version:
$Revision: 12635 $ $Date: 2010-01-18 14:15:50 +0100 (Mon, 18 Jan 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 sorting.
 
Constructor Summary
HPComparatorFactory()
           
 
Method Summary
static HPComparator addFunctionalGroupPointer(java.lang.String privCreator, int tag, HPComparator comparator)
          Decorate Sort By Attribute Comparator with Functional Group Pointer, defining the Selector Attribute as nested in a Functional Group Sequence.
static HPComparator addSequencePointer(java.lang.String privCreator, int tag, HPComparator comparator)
          Decorate Sort By Attribute Comparator with Selector Sequence Pointer, defining the Selector Attribute as nested in a Sequence.
static HPComparator createHPComparator(DicomObject sortingOp)
          Create HPComparator from Sorting Operations Sequence (0072,0600) item.
static HPComparator createSortAlongAxis(java.lang.String sortingDirection)
          Create Sort Category Comparator with Sort-by Category ALONG_AXIS.
static HPComparator createSortByAcqTime(java.lang.String sortingDirection)
          Create Sort Category Comparator with Sort-by Category BY_ACQ_TIME.
static HPComparator createSortByAttribute(java.lang.String privateCreator, int tag, int valueNumber, java.lang.String sortingDirection)
          Create Sort By Attribute Comparator.
 
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 sorting.

See Also:
Constant Field Values
Constructor Detail

HPComparatorFactory

public HPComparatorFactory()
Method Detail

createHPComparator

public static HPComparator createHPComparator(DicomObject sortingOp)
Create HPComparator from Sorting Operations Sequence (0072,0600) item. The created HPComparator is backed by the given item DicomObject.

Parameters:
item - DicomObject of Sorting Operations Sequence (0072,0600)
Returns:
the new HPComparator

createSortByAttribute

public static HPComparator createSortByAttribute(java.lang.String privateCreator,
                                                 int tag,
                                                 int valueNumber,
                                                 java.lang.String sortingDirection)
Create Sort By Attribute Comparator. A new DicomObject, representing the according Sorting Operations Sequence (0072,0600) 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
sortingDirection - CodeString.INCREASING or CodeString.DECREASING
Returns:
the new Comparator

createSortAlongAxis

public static HPComparator createSortAlongAxis(java.lang.String sortingDirection)
Create Sort Category Comparator with Sort-by Category ALONG_AXIS. A new DicomObject, representing the according Sorting Operations Sequence (0072,0600) item is allocated and initialized.

Parameters:
sortingDirection - CodeString.INCREASING or CodeString.DECREASING
Returns:
the new Comparator

createSortByAcqTime

public static HPComparator createSortByAcqTime(java.lang.String sortingDirection)
Create Sort Category Comparator with Sort-by Category BY_ACQ_TIME. A new DicomObject, representing the according Sorting Operations Sequence (0072,0600) item is allocated and initialized.

Parameters:
sortingDirection - CodeString.INCREASING or CodeString.DECREASING
Returns:
the new Comparator

addSequencePointer

public static HPComparator addSequencePointer(java.lang.String privCreator,
                                              int tag,
                                              HPComparator comparator)
Decorate Sort By Attribute Comparator 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 Comparator has to be additional decorated by addFunctionalGroupPointer(java.lang.String, int, org.dcm4che2.hp.HPComparator). The associated DicomObject is updated correspondingly. If tag = 0, the given comparator is returned unmodified.

Parameters:
privateCreator - Selector Sequence Pointer Private Creator, if Selector Sequence Pointer is contained by a Private Group, otherwise null.
tag - Functional Group Pointer
comparator - to decorate
Returns:
the decorated Comparator

addFunctionalGroupPointer

public static HPComparator addFunctionalGroupPointer(java.lang.String privCreator,
                                                     int tag,
                                                     HPComparator comparator)
Decorate Sort By Attribute Comparator 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 comparator 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
comparator - to decorate
Returns:
decorated Comparator


Copyright © 2011 dcm4che. All Rights Reserved.