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:
Serializable,Cloneable
- See Also:
-
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
FieldsModifier and TypeFieldDescriptionprotected static int[]The axis orientation static typesHashtable to hold the tags for conversion to->from dicom and to-> mipav XML formatprivate DefaultMutableTreeNodeThe dimension tree node that holds xspace, yspace, and (optionally) zspace nodesprivate booleanprivate DefaultMutableTreeNodeThe image node that holds information about the image data (rescaling, dimorder, actual data).private DefaultMutableTreeNodeThe information node that holds acquisition information, dicom tags, and moreprivate static final longprivate double[]The valid range for image pixel valuesFields 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, dtiParams, 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
ConstructorsConstructorDescriptionFileInfoMincHDF(String name, String directory, int format) MINC file information constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcalculateRescaleIntercept(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.voidStrips out the relevant patient info (if present) to insert into MIPAV's XML headerReturns all of the dicom-converted tags in the minc header as a tag-value hashtable.voiddisplayAboutInfo(JDialogBase dlog, TransMatrix matrix) Displays important information about the image.final double[]getConvertStartLocationsToDICOM(double[] step, double[][] cosines, boolean[] isCentered, int slice, double[] mincStartLoc) Converts from the minc start location to the dicom start locationsRetrieves the dicom converted tag hashtableReturns the dimension node (only 1 exists at fileinfo[0] positionReturns the image node (image info and data)Returns the information node with dicom/patient infodouble[]Gets the valid range for image data valuesbooleanvoidsetDicomTable(Hashtable<String, String> dTable) Sets the dicom converted tag hashtablevoidsetDimensionNode(DefaultMutableTreeNode dimNode) Sets the dimension node (xspace, yspace and optional zspace nodes)voidsetHasImageMinMaxDimOrder(boolean hasImageMinMaxDimOrder) voidsetImageNode(DefaultMutableTreeNode imageNode) Sets the image node (includes image info and data)voidsetInfoNode(DefaultMutableTreeNode infoNode) Sets the information node (includes dicom tags and patient infovoidsetModality(String modality) Sets the image modality based on the stringfinal voidsetStartLocations(double[] origin) Sets start locations of each axis.voidsetValidRange(double[] valid_range) Sets the valid range for the image dataMethods 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, getDTIParameters, 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, setDTIParameters, 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, toStringMethods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
dimensionNode
The dimension tree node that holds xspace, yspace, and (optionally) zspace nodes -
informationNode
The information node that holds acquisition information, dicom tags, and more -
imageNode
The image node that holds information about the image data (rescaling, dimorder, actual data). -
axisOrientation
protected static int[] axisOrientationThe axis orientation static types -
validRange
private double[] validRangeThe valid range for image pixel values -
hasImageMinMaxDimOrder
private boolean hasImageMinMaxDimOrder -
dicomTable
Hashtable to hold the tags for conversion to->from dicom and to-> mipav XML format
-
-
Constructor Details
-
FileInfoMincHDF
MINC file information constructor.- Parameters:
name- file namedirectory- file directoryformat- format (in this case, MINC)
-
-
Method Details
-
convertTagsToTable
Returns all of the dicom-converted tags in the minc header as a tag-value hashtable.- Returns:
- a tag-value hashtable
-
displayAboutInfo
Displays important information about the image.- Specified by:
displayAboutInfoin classFileInfoBase- Parameters:
dlog- where to display the infomatrix- the transformation matrix
-
setDimensionNode
Sets the dimension node (xspace, yspace and optional zspace nodes)- Parameters:
dimNode- the dimension node
-
getDimensionNode
Returns the dimension node (only 1 exists at fileinfo[0] position- Returns:
- the dimension node
-
setInfoNode
Sets the information node (includes dicom tags and patient info- Parameters:
infoNode- the information node
-
getInfoNode
Returns the information node with dicom/patient info- Returns:
- the information node
-
setImageNode
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
Returns the image node (image info and data)- Returns:
- the image node
-
setModality
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
Sets the dicom converted tag hashtable- Parameters:
dTable- hashtable holding dicom keys and tags
-
getDicomTable
Retrieves the dicom converted tag hashtable- Returns:
- the dicom hashtable
-
convertPatientInfo
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-
-