public class NIfTI1ToDicom extends Object
A class for converting NIfTI-1 image input format files into images of a specified or appropriate SOP Class.
Constructor and Description |
---|
NIfTI1ToDicom(String inputFileName,
String outputFileName,
String patientName,
String patientID,
String studyID,
String seriesNumber,
String instanceNumber)
Read a NIfTI-1 image input format files and create an image of a specified or appropriate SOP Class.
|
NIfTI1ToDicom(String inputFileName,
String outputFileName,
String patientName,
String patientID,
String studyID,
String seriesNumber,
String instanceNumber,
String modality,
String sopClass)
Read a NIfTI-1 image input format files and create an image of a specified or appropriate SOP Class.
|
Modifier and Type | Method and Description |
---|---|
static AttributeList |
createFunctionalGroupsIfNotPresent(AttributeList list,
int numberOfFrames)
Create shared and per-frame functional group sequences if not already present.
|
static AttributeList |
generateDICOMPixelDataModuleAttributesFromNIfTI1File(File inputFile,
NIfTI1Header nifti,
AttributeList list)
Using a NIfTI-1 image input file and header, create DICOM Pixel Data Module attributes.
|
static AttributeList |
generateGeometryFunctionalGroupsFromNIfTI1Header(NIfTI1Header nifti,
AttributeList list,
int numberOfFrames)
Read a per-frame and shared functional group sequences for the geometry defined in a NIfTI-1 file header.
|
static AttributeList |
generatePixelValueTransformationFunctionalGroup(AttributeList list,
int numberOfFrames,
double rescaleSlope,
double rescaleIntercept,
String rescaleType)
Insert a shared functional group sequence Pixel Value Transformation Sequence entry.
|
static AttributeList |
generateVOILUTFunctionalGroup(AttributeList list,
int numberOfFrames,
double windowWidth,
double windowCenter,
String voiLUTFunction)
Insert a shared functional group sequence Frame VOI LUT Sequence entry.
|
static void |
main(String[] arg)
Read a NIfTI-1 image input format files and create an image of a specified or appropriate SOP Class.
|
public NIfTI1ToDicom(String inputFileName, String outputFileName, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber) throws IOException, DicomException, NIfTI1Exception
Read a NIfTI-1 image input format files and create an image of a specified or appropriate SOP Class.
inputFileName
- outputFileName
- patientName
- patientID
- studyID
- seriesNumber
- instanceNumber
- IOException
DicomException
NIfTI1Exception
public NIfTI1ToDicom(String inputFileName, String outputFileName, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber, String modality, String sopClass) throws IOException, DicomException, NIfTI1Exception
Read a NIfTI-1 image input format files and create an image of a specified or appropriate SOP Class.
inputFileName
- outputFileName
- patientName
- patientID
- studyID
- seriesNumber
- instanceNumber
- modality
- may be nullsopClass
- may be nullIOException
DicomException
NIfTI1Exception
public static AttributeList createFunctionalGroupsIfNotPresent(AttributeList list, int numberOfFrames)
Create shared and per-frame functional group sequences if not already present.
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 addednumberOfFrames
- return attribute list with empty per-frame and shared functional group sequences faddedDicomException
public static AttributeList generatePixelValueTransformationFunctionalGroup(AttributeList list, int numberOfFrames, double rescaleSlope, double rescaleIntercept, String rescaleType) throws DicomException
Insert a shared functional group sequence Pixel Value Transformation Sequence entry.
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 addednumberOfFrames
- rescaleSlope
- rescaleIntercept
- rescaleType
- return attribute list with per-frame and shared functional group sequences for VOI addedDicomException
public static AttributeList generateVOILUTFunctionalGroup(AttributeList list, int numberOfFrames, double windowWidth, double windowCenter, String voiLUTFunction) throws DicomException
Insert a shared functional group sequence Frame VOI LUT Sequence entry.
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 addednumberOfFrames
- windowWidth
- windowCenter
- voiLUTFunction
- return attribute list with per-frame and shared functional group sequences for VOI addedDicomException
public static AttributeList generateGeometryFunctionalGroupsFromNIfTI1Header(NIfTI1Header nifti, AttributeList list, int numberOfFrames) throws DicomException
Read a per-frame and shared functional group sequences for the geometry defined in a NIfTI-1 file header.
nifti
- a NIfTI-1 headerlist
- 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 addednumberOfFrames
- return attribute list with per-frame and shared functional group sequences for geometry addedDicomException
public static AttributeList generateDICOMPixelDataModuleAttributesFromNIfTI1File(File inputFile, NIfTI1Header nifti, AttributeList list) throws IOException, DicomException, NIfTI1Exception
Using a NIfTI-1 image input file and header, create DICOM Pixel Data Module attributes.
inputFile
- a NIfTI-1 format image filenifti
- a NIfTI-1 header already read from the inputFilelist
- 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 addedIOException
DicomException
NIfTI1Exception
public static void main(String[] arg)
Read a NIfTI-1 image input format files and create an image of a specified or appropriate SOP Class.
arg
- seven, eight or nine parameters, the inputFile, outputFile, patientName, patientID, studyID, seriesNumber, instanceNumber, and optionally the modality, and SOP Class