Package com.pixelmed.convert

# Class CommonConvertedAttributeGeneration

java.lang.Object
com.pixelmed.convert.CommonConvertedAttributeGeneration

public class CommonConvertedAttributeGeneration extends Object

A class to support converting proprietary image input format files into images of a specified or appropriate SOP Class.

## Constructor Summary

Constructors
Constructor
Description
`CommonConvertedAttributeGeneration()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`generateCommonAttributes(AttributeList list, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber, String modality, String sopClass, boolean generateUnassignedConverted)`
Generate common attributes for converted images.
`static String`
`selectSOPClassForModalityNumberOfFramesAndPixelCharacteristics(String modality, int numberOfFrames, int samplesPerPixel, int bitsAllocated, boolean isFloatPixelData)`
Select a suitable SOP Class based on modality, number of frames and pixel data characteristics.

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CommonConvertedAttributeGeneration

public CommonConvertedAttributeGeneration()

## Method Details

### selectSOPClassForModalityNumberOfFramesAndPixelCharacteristics

public static String selectSOPClassForModalityNumberOfFramesAndPixelCharacteristics(String modality, int numberOfFrames, int samplesPerPixel, int bitsAllocated, boolean isFloatPixelData)

Select a suitable SOP Class based on modality, number of frames and pixel data characteristics.

If multi-frame selects legacy converted rather than true enhanced multi-frame SOP Classes.

Worst case returns the Secondary Capture Image Storage SOP Class.

Parameters:
  `modality` - may be null or empty string
  `numberOfFrames` -
  `samplesPerPixel` -
  `bitsAllocated` -
  `isFloatPixelData` -
Returns:
  the selected SOP Class (never null or empty)

### generateCommonAttributes

public static void generateCommonAttributes(AttributeList list, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber, String modality, String sopClass, boolean generateUnassignedConverted) throws DicomException

Generate common attributes for converted images.

Does NOT add ManufacturerModelName ... that should be added by caller.

Does NOT call CodingSchemeIdentification.replaceCodingSchemeIdentificationSequenceWithCodingSchemesUsedInAttributeList ... that should be done by caller.

Parameters:
  `list` -
  `patientName` -
  `patientID` -
  `studyID` -
  `seriesNumber` -
  `instanceNumber` -
  `modality` - may be null
  `sopClass` - may be null
  `generateUnassignedConverted` - whether or not to generate empty Unassigned Converted Attributes Sequences (populates Shared and Per-Frame Functional Groups)
Throws:
  `DicomException`
  `NumberFormatException`