com.pixelmed.convert

## Class RawRGBToDicomMultiFrame

- java.lang.Object
- - com.pixelmed.convert.RawRGBToDicomMultiFrame

    public class RawRGBToDicomMultiFrame
    extends java.lang.Object

A class for converting raw RGB color single frame image input format files (such as from Visible Human) into one or more DICOM multi-frame secondary capture images.

### Constructor Summary

Constructors
Constructor and Description

`RawRGBToDicomMultiFrame(java.lang.String formatFileName, java.lang.String inputFolderName, java.lang.String inputFileNameSuffix, java.lang.String outputFolderName, java.lang.String patientName, java.lang.String patientID, java.lang.String studyID, java.lang.String seriesNumber)`
Read raw RGB color single frame image input format files (such as from Visible Human) into one or more DICOM multi-frame secondary capture images.

### Method Summary

Methods
`static AttributeList` `generateDICOMPixelDataModuleAttributesFromRawRGBFiles(java.lang.String[] inputFileNames, java.lang.String inputFileNameSuffix, RawRGBInformation rawRGBInfo, AttributeList list)` Create DICOM Pixel Data Module attributes.
`static AttributeList` `generateGeometryFunctionalGroupsFromRawRGBInformation(RawRGBInformation rawRGBInfo, AttributeList list, int numberOfFrames)` Read a per-frame and shared functional group sequences for the geometry defined in a raw image file description.
`protected static java.lang.String[]` `getSortedInputFileNames(java.lang.String inputFolderName, java.lang.String inputFileNameSuffix)`
`static void` `main(java.lang.String[] arg)` Read raw RGB color single frame image input format files (such as from Visible Human) into one or more DICOM multi-frame secondary capture images.

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

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

### Constructor Detail

#### RawRGBToDicomMultiFrame

    public RawRGBToDicomMultiFrame(java.lang.String formatFileName,
                           java.lang.String inputFolderName,
                           java.lang.String inputFileNameSuffix,
                           java.lang.String outputFolderName,
                           java.lang.String patientName,
                           java.lang.String patientID,
                           java.lang.String studyID,
                           java.lang.String seriesNumber)
                            throws java.io.IOException,
                                   DicomException

Read raw RGB color single frame image input format files (such as from Visible Human) into one or more DICOM multi-frame secondary capture images.

Will obtain the description of the geometry of the raw RGB files, e.g., a Visible Human README file, from the specified format description file.

The order of the frames is assumed to be by their lexicographically sorted file name (hence numeric file names need to be the same length, e.g., zero-padded.

Parameters:
  `formatFileName` -
  `inputFolderName` -
  `inputFileNameSuffix` -
  `outputFolderName` -
  `patientName` -
  `patientID` -
  `studyID` -
  `seriesNumber` -
Throws:
  `java.io.IOException`
  `DicomException`

### Method Detail

#### generateGeometryFunctionalGroupsFromRawRGBInformation

    public static AttributeList generateGeometryFunctionalGroupsFromRawRGBInformation(RawRGBInformation rawRGBInfo,
                                                                      AttributeList list,
                                                                      int numberOfFrames)
                                                                               throws DicomException

Read a per-frame and shared functional group sequences for the geometry defined in a raw image file description.

Parameters:
  `rawRGBInfo` - description of the size of the raw image
  `list` - an existing (possibly empty) attribute list, if null, a new one will be created; may already shared and per-frame functional group sequences or they will be added
  `numberOfFrames` - return attribute list with per-frame and shared functional group sequences for geometry added
Throws:
  `DicomException`

#### generateDICOMPixelDataModuleAttributesFromRawRGBFiles

    public static AttributeList generateDICOMPixelDataModuleAttributesFromRawRGBFiles(java.lang.String[] inputFileNames,
                                                                      java.lang.String inputFileNameSuffix,
                                                                      RawRGBInformation rawRGBInfo,
                                                                      AttributeList list)
                                                                               throws java.io.IOException,
                                                                                      DicomException

Create DICOM Pixel Data Module attributes.

Parameters:
  `inputFileNames` - the single frame raw RGB format image files sorted in the correct order
  `inputFileNameSuffix` - so we can tell whether or not the input files are compressed
  `rawRGBInfo` - description of the size of the raw image already read from the inputFile
  `list` - an existing (possibly empty) attribute list, if null, a new one will be created; may already include "better" image pixel module attributes to use return attribute list with Image Pixel Module (including Pixel Data) and other attributes added
Throws:
  `java.io.IOException`
  `DicomException`

#### getSortedInputFileNames

    protected static java.lang.String[] getSortedInputFileNames(java.lang.String inputFolderName,
                                             java.lang.String inputFileNameSuffix)
                                                         throws java.io.IOException

Throws:
  `java.io.IOException`

#### main

    public static void main(java.lang.String[] arg)

Read raw RGB color single frame image input format files (such as from Visible Human) into one or more DICOM multi-frame secondary capture images.

Will obtain the description of the geometry of the raw RGB files, e.g., a Visible Human README file, from the specified format description file.

Parameters:
  `arg` - eight parameters, the format description file, inputFolder, inputFileNameSuffix, outputFolder, patientName, patientID, studyID, seriesNumber