Package gov.nih.mipav.model.file
Class FileInfoMincHDF
- java.lang.Object
-
- gov.nih.mipav.model.structures.ModelSerialCloneable
-
- gov.nih.mipav.model.file.FileInfoBase
-
- gov.nih.mipav.model.file.FileInfoMincHDF
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class FileInfoMincHDF extends FileInfoBase
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.model.file.FileInfoBase
FileInfoBase.AxisOrientation, FileInfoBase.ImageOrientation, FileInfoBase.Modality, FileInfoBase.Unit, FileInfoBase.UnitType
-
-
Field Summary
Fields Modifier and Type Field Description protected static int[]
axisOrientation
The axis orientation static typesprivate java.util.Hashtable<java.lang.String,java.lang.String>
dicomTable
Hashtable to hold the tags for conversion to->from dicom and to-> mipav XML formatprivate javax.swing.tree.DefaultMutableTreeNode
dimensionNode
The dimension tree node that holds xspace, yspace, and (optionally) zspace nodesprivate boolean
hasImageMinMaxDimOrder
private javax.swing.tree.DefaultMutableTreeNode
imageNode
The image node that holds information about the image data (rescaling, dimorder, actual data).private javax.swing.tree.DefaultMutableTreeNode
informationNode
The information node that holds acquisition information, dicom tags, and moreprivate static long
serialVersionUID
private double[]
validRange
The valid range for image pixel values-
Fields inherited from class gov.nih.mipav.model.file.FileInfoBase
ANGSTROMS, ANGSTROMS_STRING, AXIAL, axisOrientationStr, BIOMAGNETIC_IMAGING, cameraMake, cameraModel, CENTIMETERS, CENTIMETERS_STRING, COLOR_FLOW_DOPPLER, COMPRESSION_BZIP2, COMPRESSION_GZIP, COMPRESSION_NONE, COMPRESSION_ZIP, COMPUTED_RADIOGRAPHY, COMPUTED_TOMOGRAPHY, conversionSpaceTimeUnits, CORONAL, DEGREES, DEGREES_STRING, DIAPHANOGRAPHY, DIGITAL_RADIOGRAPHY, DUPLEX_DOPPLER, ENDOSCOPY, exposureTime, EXTERNAL_CAMERA_PHOTOGRAPHY, FA, fileName, fileSuffix, FNumber, focalLength, focalLength35, GENERAL_MICROSCOPY, HARDCOPY, HOURS, HOURS_STRING, HZ, HZ_STRING, ICG, imageOrientation, INCHES, INCHES_STRING, INTRAORAL_RADIOGRAPHY, ISOSpeedRating, KILOMETERS, KILOMETERS_STRING, LASER_SURFACE_SCAN, MAGNETIC_RESONANCE, MAGNETIC_RESONANCE_ANGIOGRAPHY, MAGNETIC_RESONANCE_SPECTROSCOPY, MAMMOGRAPHY, METERS, METERS_STRING, MICROMETERS, MICROMETERS_STRING, MICROSEC, MICROSEC_STRING, MILES, MILES_STRING, MILLIMETERS, MILLIMETERS_STRING, MILLISEC, MILLISEC_STRING, MILS, MILS_STRING, MINUTES, MINUTES_STRING, modality, NANOMETERS, NANOMETERS_STRING, NANOSEC, NANOSEC_STRING, NUCLEAR_MEDICINE, ORI_A2P_TYPE, ORI_I2S_TYPE, ORI_L2R_TYPE, ORI_P2A_TYPE, ORI_R2L_TYPE, ORI_S2I_TYPE, ORI_UNKNOWN_TYPE, origin, OTHER, PANORAMIC_XRAY, POSITRON_EMISSION_TOMOGRAPHY, PPM, PPM_STRING, RADIO_FLUOROSCOPY, RADIOGRAPHIC_IMAGING, RADIOTHERAPY_DOSE, RADIOTHERAPY_IMAGE, RADIOTHERAPY_PLAN, RADIOTHERAPY_RECORD, RADIOTHERAPY_STRUCTURE_SET, RADS, RADS_STRING, RED_FREE, SAGITTAL, SECONDS, SECONDS_STRING, SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY, SLIDE_MICROSCOPY, sUnits, tagDescription, tagName, THERMOGRAPHY, TRANSFORM_ANOTHER_DATASET, TRANSFORM_MNI_152, TRANSFORM_SCANNER_ANATOMICAL, TRANSFORM_TALAIRACH_TOURNOUX, TRANSFORM_UNKNOWN, tUnits, ULTRASOUND, unitsOfMeasure, UNKNOWN_MEASURE, UNKNOWN_MODALITY, UNKNOWN_ORIENT, UNKNOWN_STRING, XRAY_ANGIOGRAPHY
-
-
Constructor Summary
Constructors Constructor Description FileInfoMincHDF(java.lang.String name, java.lang.String directory, int format)
MINC file information constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
calculateRescaleIntercept(double[] rescaleIntercept, double[] rescaleSlope, double[] imageMax, double[] imageMin, double[] valid_range, boolean hasImageMinMaxDimOrder)
In MINC images, "real" values for pixels are calculated by taking the given image min and image max and rescaling the data accordingly.void
convertPatientInfo(FileInfoImageXML dInfo)
Strips out the relevant patient info (if present) to insert into MIPAV's XML headerjava.util.Hashtable<java.lang.String,java.lang.String>
convertTagsToTable()
Returns all of the dicom-converted tags in the minc header as a tag-value hashtable.void
displayAboutInfo(JDialogBase dlog, TransMatrix matrix)
Displays important information about the image.double[]
getConvertStartLocationsToDICOM(double[] step, double[][] cosines, boolean[] isCentered, int slice, double[] mincStartLoc)
Converts from the minc start location to the dicom start locationsjava.util.Hashtable<java.lang.String,java.lang.String>
getDicomTable()
Retrieves the dicom converted tag hashtablejavax.swing.tree.DefaultMutableTreeNode
getDimensionNode()
Returns the dimension node (only 1 exists at fileinfo[0] positionjavax.swing.tree.DefaultMutableTreeNode
getImageNode()
Returns the image node (image info and data)javax.swing.tree.DefaultMutableTreeNode
getInfoNode()
Returns the information node with dicom/patient infodouble[]
getValidRange()
Gets the valid range for image data valuesboolean
isHasImageMinMaxDimOrder()
void
setDicomTable(java.util.Hashtable<java.lang.String,java.lang.String> dTable)
Sets the dicom converted tag hashtablevoid
setDimensionNode(javax.swing.tree.DefaultMutableTreeNode dimNode)
Sets the dimension node (xspace, yspace and optional zspace nodes)void
setHasImageMinMaxDimOrder(boolean hasImageMinMaxDimOrder)
void
setImageNode(javax.swing.tree.DefaultMutableTreeNode imageNode)
Sets the image node (includes image info and data)void
setInfoNode(javax.swing.tree.DefaultMutableTreeNode infoNode)
Sets the information node (includes dicom tags and patient infovoid
setModality(java.lang.String modality)
Sets the image modality based on the stringvoid
setStartLocations(double[] origin)
Sets start locations of each axis.void
setValidRange(double[] valid_range)
Sets the valid range for the image data-
Methods inherited from class gov.nih.mipav.model.file.FileInfoBase
copyCoreInfo, copyCoreInfo, displayAboutInfo, displayPrimaryInfo, finalize, getAboutInfo, getAllSameDimUnits, getAreaUnitsOfMeasureStr, getAxisDirection, getAxisOrientation, getAxisOrientation, getAxisOrientationFromStr, getAxisOrientationStr, getCameraMake, getCameraModel, getCompressionType, getDataType, getDataTypeFromStr, getEndianess, getEndianessFromStr, getExposureTime, getExtents, getFileDirectory, getFileFormat, getFileName, getFileSuffix, getFNumber, getFocalLength, getFocalLength35, getImageOrientation, getImageOrientationFromStr, getImageOrientationStr, getIs2_5D, getISOSpeedRating, getLPSOrigin, getLUT, getMax, getMaxB, getMaxG, getMaxR, getMin, getMinB, getMinG, getMinR, getModality, getModalityFromStr, getModalityStr, getModalityStr, getMultiFile, getNumOfBytesPerPixel, getOffset, getOrigin, getOrigin, getOriginalEndianess, getOriginAtSlice, getPhotometric, getPixelPadValue, getPrimaryInfo, getRescaleIntercept, getRescaleSlope, getResolution, getResolutions, getSize, getSliceThickness, getUnitsOfMeasure, getUnitsOfMeasure, getUnitsOfMeasureAbbrevStr, getUnitsOfMeasureAbbrevStr, getUnitsOfMeasureFromStr, getUnitsOfMeasureStr, getUnitsOfMeasureStr, getVolumeUnitsOfMeasureStr, isDicomOrdered, oppositeOrient, sameAxis, setAxisOrientation, setAxisOrientation, setCameraMake, setCameraModel, setCompressionType, setDataType, setEndianess, setExposureTime, setExtents, setExtents, setFileDirectory, setFileFormat, setFileName, setFileSuffix, setFNumber, setFocalLength, setFocalLength35, setImageOrientation, setISOSpeedRating, setLUT, setMax, setMaxB, setMaxG, setMaxR, setMin, setMinB, setMinG, setMinR, setModality, setMultiFile, setOffset, setOrigin, setOrigin, setOriginalEndianess, setPhotometric, setPixelPadValue, setRescaleIntercept, setRescaleSlope, setResolutions, setResolutions, setSliceThickness, setTagDescription, setTagName, setUnitsOfMeasure, setUnitsOfMeasure, setUnitsOfMeasure, setUnitsOfMeasure, toString
-
Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
dimensionNode
private transient javax.swing.tree.DefaultMutableTreeNode dimensionNode
The dimension tree node that holds xspace, yspace, and (optionally) zspace nodes
-
informationNode
private transient javax.swing.tree.DefaultMutableTreeNode informationNode
The information node that holds acquisition information, dicom tags, and more
-
imageNode
private transient javax.swing.tree.DefaultMutableTreeNode imageNode
The image node that holds information about the image data (rescaling, dimorder, actual data).
-
axisOrientation
protected static int[] axisOrientation
The axis orientation static types
-
validRange
private double[] validRange
The valid range for image pixel values
-
hasImageMinMaxDimOrder
private boolean hasImageMinMaxDimOrder
-
dicomTable
private transient java.util.Hashtable<java.lang.String,java.lang.String> dicomTable
Hashtable to hold the tags for conversion to->from dicom and to-> mipav XML format
-
-
Method Detail
-
convertTagsToTable
public java.util.Hashtable<java.lang.String,java.lang.String> convertTagsToTable()
Returns all of the dicom-converted tags in the minc header as a tag-value hashtable.- Returns:
- a tag-value hashtable
-
displayAboutInfo
public void displayAboutInfo(JDialogBase dlog, TransMatrix matrix)
Displays important information about the image.- Specified by:
displayAboutInfo
in classFileInfoBase
- Parameters:
dlog
- where to display the infomatrix
- the transformation matrix
-
setDimensionNode
public void setDimensionNode(javax.swing.tree.DefaultMutableTreeNode dimNode)
Sets the dimension node (xspace, yspace and optional zspace nodes)- Parameters:
dimNode
- the dimension node
-
getDimensionNode
public javax.swing.tree.DefaultMutableTreeNode getDimensionNode()
Returns the dimension node (only 1 exists at fileinfo[0] position- Returns:
- the dimension node
-
setInfoNode
public void setInfoNode(javax.swing.tree.DefaultMutableTreeNode infoNode)
Sets the information node (includes dicom tags and patient info- Parameters:
infoNode
- the information node
-
getInfoNode
public javax.swing.tree.DefaultMutableTreeNode getInfoNode()
Returns the information node with dicom/patient info- Returns:
- the information node
-
setImageNode
public void setImageNode(javax.swing.tree.DefaultMutableTreeNode imageNode)
Sets the image node (includes image info and data)- Parameters:
imageNode
- the image node
-
isHasImageMinMaxDimOrder
public boolean isHasImageMinMaxDimOrder()
-
setHasImageMinMaxDimOrder
public void setHasImageMinMaxDimOrder(boolean hasImageMinMaxDimOrder)
-
getImageNode
public javax.swing.tree.DefaultMutableTreeNode getImageNode()
Returns the image node (image info and data)- Returns:
- the image node
-
setModality
public void setModality(java.lang.String modality)
Sets the image modality based on the string
-
setValidRange
public void setValidRange(double[] valid_range)
Sets the valid range for the image data- Parameters:
valid_range
- double valid range of image data values
-
getValidRange
public double[] getValidRange()
Gets the valid range for image data values- Returns:
- the valid range (min to max) array
-
setDicomTable
public void setDicomTable(java.util.Hashtable<java.lang.String,java.lang.String> dTable)
Sets the dicom converted tag hashtable- Parameters:
dTable
- hashtable holding dicom keys and tags
-
getDicomTable
public java.util.Hashtable<java.lang.String,java.lang.String> getDicomTable()
Retrieves the dicom converted tag hashtable- Returns:
- the dicom hashtable
-
convertPatientInfo
public void convertPatientInfo(FileInfoImageXML dInfo)
Strips out the relevant patient info (if present) to insert into MIPAV's XML header- Parameters:
dInfo
- destination XML fileinfo
-
getConvertStartLocationsToDICOM
public final double[] getConvertStartLocationsToDICOM(double[] step, double[][] cosines, boolean[] isCentered, int slice, double[] mincStartLoc)
Converts from the minc start location to the dicom start locations- Parameters:
step
- the resolutions (step, can be negative)cosines
- the directional matrixisCentered
- is the axis centeredslice
- the slice numbermincStartLoc
- the original minc start location [x,y, opt z]- Returns:
-
setStartLocations
public final void setStartLocations(double[] origin)
Sets start locations of each axis.- Parameters:
origin
- the image origin
-
calculateRescaleIntercept
public static void calculateRescaleIntercept(double[] rescaleIntercept, double[] rescaleSlope, double[] imageMax, double[] imageMin, double[] valid_range, boolean hasImageMinMaxDimOrder)
In MINC images, "real" values for pixels are calculated by taking the given image min and image max and rescaling the data accordingly. Image min and image max are given per slice.- Parameters:
rescaleIntercept
-rescaleSlope
-imageMax
-imageMin
-validMax
-validMin
-
-
-