Class FileInfoBase

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
FileInfoAfni, FileInfoAnalyze, FileInfoAvi, FileInfoBFLOAT, FileInfoBioRad, FileInfoBMP, FileInfoBRUKER, FileInfoCheshire, FileInfoCOR, FileInfoCZI, FileInfoDicom, FileInfoDM3, FileInfoFits, FileInfoGESigna4X, FileInfoGESigna5X, FileInfoICS, FileInfoInterfile, FileInfoJP2, FileInfoJPEG_LS, FileInfoJPEG_XL, FileInfoJSON, FileInfoLattice, FileInfoLIFF, FileInfoLSM, FileInfoMagnetomVision, FileInfoMATLAB, FileInfoMedVision, FileInfoMetaImage, FileInfoMGH, FileInfoMicroCat, FileInfoMinc, FileInfoMincHDF, FileInfoMRC, FileInfoNIFTI, FileInfoNRRD, FileInfoOME, FileInfoPARREC, FileInfoPGM, FileInfoPPM, FileInfoRaw, FileInfoSiemensText, FileInfoSPAR, FileInfoSPM, FileInfoSTK, FileInfoSVS, FileInfoTiff, FileInfoTMG, FileInfoTrackVis, FileInfoVista, FileInfoXML, FileInfoZVI

public abstract class FileInfoBase extends ModelSerialCloneable
This structure contains the basic information that describes how the image is stored on disk.

Subclasses add additional information which is particular to that image-format.

This class needs work

1. fixing (making consistent what to do when null pointers encountered. see getStartLocation and getUnitsOfMeasure

Version:
0.9 June 30, 1998
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • sUnits

      public static final String[] sUnits
      Deprecated.
      Array of space units: inches, mm, etc.
    • tUnits

      public static final String[] tUnits
      Deprecated.
      Array of time units: seconds, minutes, etc.
    • UNKNOWN_MEASURE

      public static final int UNKNOWN_MEASURE
      Unit of measurement unknown.
      See Also:
    • INCHES

      public static final int INCHES
      Unit of measurement inches.
      See Also:
    • MILS

      public static final int MILS
      Units of measurement mil (thousandth of an inch)
      See Also:
    • CENTIMETERS

      public static final int CENTIMETERS
      Unit of measurement centimeters.
      See Also:
    • ANGSTROMS

      public static final int ANGSTROMS
      Unit of measurement angstroms.
      See Also:
    • NANOMETERS

      public static final int NANOMETERS
      Unit of measurement nanometers.
      See Also:
    • MICROMETERS

      public static final int MICROMETERS
      Unit of measurement micrometers.
      See Also:
    • MILLIMETERS

      public static final int MILLIMETERS
      Unit of measurement millimeters.
      See Also:
    • METERS

      public static final int METERS
      Unit of measurement meters.
      See Also:
    • KILOMETERS

      public static final int KILOMETERS
      Unit of measurement kilometers.
      See Also:
    • MILES

      public static final int MILES
      Unit of measurement miles.
      See Also:
    • NANOSEC

      public static final int NANOSEC
      Unit of measurement nanoseconds.
      See Also:
    • MICROSEC

      public static final int MICROSEC
      Unit of measurement microseconds.
      See Also:
    • MILLISEC

      public static final int MILLISEC
      Unit of measurement milliseconds.
      See Also:
    • SECONDS

      public static final int SECONDS
      Unit of measurement seconds.
      See Also:
    • MINUTES

      public static final int MINUTES
      Unit of measurement minutes.
      See Also:
    • HOURS

      public static final int HOURS
      Unit of measurement hours.
      See Also:
    • HZ

      public static final int HZ
      Unit of measurement hertz.
      See Also:
    • PPM

      public static final int PPM
      Unit of measurement part-per-million.
      See Also:
    • RADS

      public static final int RADS
      Radians per second.
      See Also:
    • DEGREES

      public static final int DEGREES
      See Also:
    • UNKNOWN_STRING

      public static final String UNKNOWN_STRING
      String version of units of measurement - unknown.
      See Also:
    • INCHES_STRING

      public static final String INCHES_STRING
      String version of units of measurement - inches.
      See Also:
    • MILS_STRING

      public static final String MILS_STRING
      String version of units of measurement - mils.
      See Also:
    • CENTIMETERS_STRING

      public static final String CENTIMETERS_STRING
      String version of units of measurement - centimeters.
      See Also:
    • ANGSTROMS_STRING

      public static final String ANGSTROMS_STRING
      String version of units of measurement - angstroms.
      See Also:
    • NANOMETERS_STRING

      public static final String NANOMETERS_STRING
      String version of units of measurement - nanometers.
      See Also:
    • MICROMETERS_STRING

      public static final String MICROMETERS_STRING
      String version of units of measurement - micrometers.
      See Also:
    • MILLIMETERS_STRING

      public static final String MILLIMETERS_STRING
      String version of units of measurement - millimeters.
      See Also:
    • METERS_STRING

      public static final String METERS_STRING
      String version of units of measurement - meters.
      See Also:
    • KILOMETERS_STRING

      public static final String KILOMETERS_STRING
      String version of units of measurement - kilometers.
      See Also:
    • MILES_STRING

      public static final String MILES_STRING
      String version of units of measurement - miles.
      See Also:
    • NANOSEC_STRING

      public static final String NANOSEC_STRING
      String version of units of measurement - nanoseconds.
      See Also:
    • MICROSEC_STRING

      public static final String MICROSEC_STRING
      String version of units of measurement - microseconds.
      See Also:
    • MILLISEC_STRING

      public static final String MILLISEC_STRING
      String version of units of measurement - milliseconds.
      See Also:
    • SECONDS_STRING

      public static final String SECONDS_STRING
      String version of units of measurement - seconds.
      See Also:
    • MINUTES_STRING

      public static final String MINUTES_STRING
      String version of units of measurement - minutes.
      See Also:
    • HOURS_STRING

      public static final String HOURS_STRING
      String version of units of measurement - hours.
      See Also:
    • HZ_STRING

      public static final String HZ_STRING
      String version of units of measurement - hertz.
      See Also:
    • PPM_STRING

      public static final String PPM_STRING
      String version of units of measurement - part-per-million.
      See Also:
    • RADS_STRING

      public static final String RADS_STRING
      String version of units of measurement - radians per second.
      See Also:
    • DEGREES_STRING

      public static final String DEGREES_STRING
      String version of units of measurement - degrees.
      See Also:
    • conversionSpaceTimeUnits

      public static final double[] conversionSpaceTimeUnits
      Deprecated.
      should use enum conversions
      Converting between space units. Conversion is to millimeters (the default). Table converts to mm by multiplication. Converts from mm by division. Example: inches * 25.4f = mm mm / 25.4f = inches. Converting between time units. Conversion is to seconds(the default). Table converts to seconds by multiplication. Converts from seconds by division. Example: minutes * 0.01667 = seconds seconds / 0.01667 = minutes. Hertz and radians per second convert to/from hz. parts-per-million does not convert.
    • UNKNOWN_MODALITY

      public static final int UNKNOWN_MODALITY
      Image modality unknown.
      See Also:
    • BIOMAGNETIC_IMAGING

      public static final int BIOMAGNETIC_IMAGING
      Image modality biomagnetic imaging.
      See Also:
    • COLOR_FLOW_DOPPLER

      public static final int COLOR_FLOW_DOPPLER
      Image modality color flow doppler.
      See Also:
    • COMPUTED_RADIOGRAPHY

      public static final int COMPUTED_RADIOGRAPHY
      Image modality CR.
      See Also:
    • COMPUTED_TOMOGRAPHY

      public static final int COMPUTED_TOMOGRAPHY
      Image modality CT.
      See Also:
    • DUPLEX_DOPPLER

      public static final int DUPLEX_DOPPLER
      Image modality duplex doppler.
      See Also:
    • DIAPHANOGRAPHY

      public static final int DIAPHANOGRAPHY
      Image modality diaphanography.
      See Also:
    • DIGITAL_RADIOGRAPHY

      public static final int DIGITAL_RADIOGRAPHY
      Image modality digital radiography.
      See Also:
    • ENDOSCOPY

      public static final int ENDOSCOPY
      Image modality endoscopy.
      See Also:
    • GENERAL_MICROSCOPY

      public static final int GENERAL_MICROSCOPY
      Image modality general microscopy.
      See Also:
    • HARDCOPY

      public static final int HARDCOPY
      Image modality hard copy.
      See Also:
    • INTRAORAL_RADIOGRAPHY

      public static final int INTRAORAL_RADIOGRAPHY
      Image modality intraoral radiography.
      See Also:
    • LASER_SURFACE_SCAN

      public static final int LASER_SURFACE_SCAN
      Image modality laser surface scan.
      See Also:
    • MAGNETIC_RESONANCE_ANGIOGRAPHY

      public static final int MAGNETIC_RESONANCE_ANGIOGRAPHY
      Image modality MR angiography.
      See Also:
    • MAMMOGRAPHY

      public static final int MAMMOGRAPHY
      Image modality mammography.
      See Also:
    • MAGNETIC_RESONANCE

      public static final int MAGNETIC_RESONANCE
      Image modality MR.
      See Also:
    • MAGNETIC_RESONANCE_SPECTROSCOPY

      public static final int MAGNETIC_RESONANCE_SPECTROSCOPY
      Image modality MR SPECT.
      See Also:
    • NUCLEAR_MEDICINE

      public static final int NUCLEAR_MEDICINE
      Image modality nuclear medicine.
      See Also:
    • OTHER

      public static final int OTHER
      Image modality other.
      See Also:
    • POSITRON_EMISSION_TOMOGRAPHY

      public static final int POSITRON_EMISSION_TOMOGRAPHY
      Image modality PET.
      See Also:
    • PANORAMIC_XRAY

      public static final int PANORAMIC_XRAY
      Image modality panoramtic X ray.
      See Also:
    • RADIO_FLUOROSCOPY

      public static final int RADIO_FLUOROSCOPY
      Image modality radio fluoroscopy.
      See Also:
    • RADIOGRAPHIC_IMAGING

      public static final int RADIOGRAPHIC_IMAGING
      Image modality radiographic imaging.
      See Also:
    • RADIOTHERAPY_DOSE

      public static final int RADIOTHERAPY_DOSE
      Image modality radiotherapy dose.
      See Also:
    • RADIOTHERAPY_IMAGE

      public static final int RADIOTHERAPY_IMAGE
      Image modality radiotherapy image.
      See Also:
    • RADIOTHERAPY_PLAN

      public static final int RADIOTHERAPY_PLAN
      Image modality radiotherapy plan.
      See Also:
    • RADIOTHERAPY_RECORD

      public static final int RADIOTHERAPY_RECORD
      Image modality radiotherapy record.
      See Also:
    • RADIOTHERAPY_STRUCTURE_SET

      public static final int RADIOTHERAPY_STRUCTURE_SET
      Image modality radiotherapy structure set.
      See Also:
    • SLIDE_MICROSCOPY

      public static final int SLIDE_MICROSCOPY
      Image modality slide microscopy.
      See Also:
    • SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY

      public static final int SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY
      Image modality SPECT.
      See Also:
    • THERMOGRAPHY

      public static final int THERMOGRAPHY
      Image modality thermography.
      See Also:
    • ULTRASOUND

      public static final int ULTRASOUND
      Image modality ultrasound.
      See Also:
    • XRAY_ANGIOGRAPHY

      public static final int XRAY_ANGIOGRAPHY
      Image modality X ray angiography.
      See Also:
    • EXTERNAL_CAMERA_PHOTOGRAPHY

      public static final int EXTERNAL_CAMERA_PHOTOGRAPHY
      Image modality external camera photography.
      See Also:
    • RED_FREE

      public static final int RED_FREE
      Image modality Red Free.
      See Also:
    • FA

      public static final int FA
      Image modality Fluorescein Angiography.
      See Also:
    • ICG

      public static final int ICG
      Image modality IndoCyanine Green.
      See Also:
    • modalityStr

      private static final String[] modalityStr
      Deprecated.
      No longer needed since enum works now
      Array of modality strings -- again, numbering starts at 1, not 0.
    • ORI_UNKNOWN_TYPE

      public static final int ORI_UNKNOWN_TYPE
      Axis orientation unknown.
      See Also:
    • ORI_R2L_TYPE

      public static final int ORI_R2L_TYPE
      Axis orientation Right to Left.
      See Also:
    • ORI_L2R_TYPE

      public static final int ORI_L2R_TYPE
      Axis orientation Left to Right.
      See Also:
    • ORI_P2A_TYPE

      public static final int ORI_P2A_TYPE
      Axis orientation Posterior to Anterior.
      See Also:
    • ORI_A2P_TYPE

      public static final int ORI_A2P_TYPE
      Axis orientation Anterior to Posterior.
      See Also:
    • ORI_I2S_TYPE

      public static final int ORI_I2S_TYPE
      Axis orientation Inferior to Superior.
      See Also:
    • ORI_S2I_TYPE

      public static final int ORI_S2I_TYPE
      Axis orientation Superior to Inferior.
      See Also:
    • axisOrientationStr

      public static final String[] axisOrientationStr
      Array of axis orientation strings.
    • AXIAL

      public static final int AXIAL
      Axial orientation.
      See Also:
    • CORONAL

      public static final int CORONAL
      Coronal orientation.
      See Also:
    • SAGITTAL

      public static final int SAGITTAL
      Sagittal orientation.
      See Also:
    • UNKNOWN_ORIENT

      public static final int UNKNOWN_ORIENT
      Unknown orientation.
      See Also:
    • imageOrientationStr

      private static final String[] imageOrientationStr
      Array of image orientation strings.
    • TRANSFORM_UNKNOWN

      public static final int TRANSFORM_UNKNOWN
      Unknown transform ID.
      See Also:
    • TRANSFORM_SCANNER_ANATOMICAL

      public static final int TRANSFORM_SCANNER_ANATOMICAL
      Scanner Anatomical transform ID.
      See Also:
    • TRANSFORM_ANOTHER_DATASET

      public static final int TRANSFORM_ANOTHER_DATASET
      Another Dataset transform ID.
      See Also:
    • TRANSFORM_TALAIRACH_TOURNOUX

      public static final int TRANSFORM_TALAIRACH_TOURNOUX
      Talairach Tournoux transform ID.
      See Also:
    • TRANSFORM_MNI_152

      public static final int TRANSFORM_MNI_152
      MNI 152 transform ID.
      See Also:
    • COMPRESSION_NONE

      public static final int COMPRESSION_NONE
      Indicates no compression.
      See Also:
    • COMPRESSION_ZIP

      public static final int COMPRESSION_ZIP
      Indicates zip compression of an image.
      See Also:
    • COMPRESSION_GZIP

      public static final int COMPRESSION_GZIP
      Indicates gzip compression of an image.
      See Also:
    • COMPRESSION_BZIP2

      public static final int COMPRESSION_BZIP2
      Indicates bzip2 compression of an image.
      See Also:
    • axisOrientation

      protected int[] axisOrientation
      axis orientation used to support image ordering and display for medical images. We support the right hand rule where the origin is the upper left hand of the image with the positive axis.

      x - left to right y - top to botton z - into the screen

    • fileName

      protected String fileName
      The file name which includes the path information.
    • fileSuffix

      protected String fileSuffix
      File suffix (ex. "jpg")
    • imageOrientation

      protected int imageOrientation
      Indicates the image orientation (i.e. Axial, Coronal, ...)
    • modality

      protected int modality
      Indicates the modality (medical image type) of the dataset.
    • origin

      protected float[] origin
      The origin to support image locations (ie. DICOM, MINC ...) it is relative to the image origin. the positive axis are right hand rule.

      x - left to right y - top to botton z - into the screen

    • compressionType

      private int compressionType
      Used to indicate if the raw data was also compression (0 = no, 1 = zip).
    • dataType

      private int dataType
      The data type of the data (i.e. byte, short, float ...
    • dimResolutions

      private float[] dimResolutions
      Pixel or voxel resolutions for each dimension - default = 1.0. The z-dim resolution should be the spacing between the centers of adjacent slices; sometimes this will match the slice thickness, but not always.
    • endianess

      private boolean endianess
      The Endianess of the data. Intel, DEC Alpha ***** LSB first byte LITTLE_ENDIAN (false) Motorola (MAC), SPARC (SUN), SGI IRIX MSB first byte BIG_ENDIAN (true)
    • originalEndianess

      private boolean originalEndianess
      Used for checking for endianess changes in the ModelImage.reallocate(final int type) function.
    • extents

      private int[] extents
      Image extents as decribed by the image file format.
    • fileFormat

      private int fileFormat
      File format as defined in the Filebase.
    • max

      private double max
      Image maximum intensity for single channel image.
    • maxB

      private double maxB
      Image maximum intensity for the blue channel of an RGB image.
    • maxG

      private double maxG
      Image maximum intensity for the green channel of an RGB image.
    • maxR

      private double maxR
      Image maximum intensity for the red channel of an RGB image.
    • min

      private double min
      Image minimum intensity for single channel image.
    • minB

      private double minB
      Image minimum intensity for the blue channel of an RGB image.
    • minG

      private double minG
      Image minimum intensity for the green channel of an RGB image.
    • minR

      private double minR
      Image minimum intensity for the red channel of an RGB image.
    • lut

      private ModelLUT lut
      ModelLUT associated with fileinfo
    • multiFile

      private boolean multiFile
      Flag that indicates whether or not the image is in multiple files (tiff).
    • offset

      private int offset
      Number of bytes to the start the image data - ie. the header length
    • photometric

      private short photometric
      Image minimum intensity for single channel image.
    • pixelPadValue

      private Short pixelPadValue
      Some file formats have a pad value for pixels outside the acquisition domain.
    • rescaleIntercept

      private double rescaleIntercept
      DICOM images have a rescale y-intercept value that we have also kept in the base.
    • rescaleSlope

      private double rescaleSlope
      DICOM images have a rescale slope value that we have also kept in the base.
    • sliceThickness

      private float sliceThickness
      The thickness of individual slices in the image volume. Stored in dicom tag 0018,0050 and various other places in other file formats.
    • unitsOfMeasure

      protected FileInfoBase.Unit[] unitsOfMeasure
      Describes the units of measure for the dataset.
    • tagName

      protected Vector<String> tagName
    • tagDescription

      protected Vector<String> tagDescription
    • focalLength

      protected double focalLength
    • focalLength35

      protected double focalLength35
    • cameraMake

      protected String cameraMake
    • cameraModel

      protected String cameraModel
    • exposureTime

      protected double exposureTime
    • FNumber

      protected double FNumber
    • ISOSpeedRating

      protected double ISOSpeedRating
    • dtiParams

      protected DTIParameters dtiParams
  • Constructor Details

    • FileInfoBase

      public FileInfoBase(String name, String directory, int format)
      fileInfo constructor.
      Parameters:
      name - name of file
      directory - file directory
      format - file storage format -- see FileBase.java
    • FileInfoBase

      protected FileInfoBase(FileInfoBase copy)
      Internal constructor for clone usage.
  • Method Details

    • displayAboutInfo

      public abstract void displayAboutInfo(JDialogBase dialog, TransMatrix matrix)
      Abstract method which is used by the extending class to display information about the window.
      Parameters:
      dialog - Area where image information is to be displayed.
      matrix - Transformation matrix
    • getAboutInfo

      public String getAboutInfo(TransMatrix matrix)
      Abstract method which is used by the extending class to return information about the file header.
      Parameters:
      matrix - Transformation matrix
      Returns:
      A string containing information from the image header.
    • copyCoreInfo

      public static void copyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo)
      Helper method to copy important file info type to another file info type.
      Parameters:
      originalInfo - source file info.
      newInfo - destination file info.
    • copyCoreInfo

      public static void copyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo, boolean[] listNoCopy)
      Helper method to copy core information from one fileinfo into another, this method also has a list of fileinfos NOT to copy (used by JDialogRemoveSlices).
      Parameters:
      originalInfo - FileInfoBase[] original file infos (longer list)
      newInfo - FileInfoBase[] new file infos (shorter list)
      listNoCopy - boolean[] boolean array of indices into the original fileinfos that should not be copied
    • getAxisOrientationFromStr

      public static int getAxisOrientationFromStr(String s)
      Returns the axis orientation associated with a string.
      Parameters:
      s - String to test
      Returns:
      axis orientation
    • getAxisOrientationStr

      public static String getAxisOrientationStr(int m)
      Return the string associated with an axis orientation.
      Parameters:
      m - int representing the axis orientation (see the static definitions)
      Returns:
      String representing the string associated with the axis orientation.
    • getDataTypeFromStr

      public static int getDataTypeFromStr(String s)
      Returns the image data type associated with a string.
      Parameters:
      s - String to test
      Returns:
      data type
    • getEndianessFromStr

      public static boolean getEndianessFromStr(String s)
      Returns the endianess associated with a string.
      Parameters:
      s - String to test
      Returns:
      Big endian or little endian
    • getImageOrientationFromStr

      public static int getImageOrientationFromStr(String s)
      Returns the image orientation associated with a string.
      Parameters:
      s - String to test
      Returns:
      image orientation
    • getImageOrientationStr

      public static String getImageOrientationStr(int m)
      Return the string associated with an image orientation.
      Parameters:
      m - the orientation (see the static definitions)
      Returns:
      the string associated with the orientation.
    • getModalityFromStr

      public static int getModalityFromStr(String s)
      Returns the modality associated with a string.
      Parameters:
      s - String to test
      Returns:
      modality
    • getModalityStr

      public static String[] getModalityStr()
      Return all the modality strings as an array.
      Returns:
      String[] - array containing the strings associated with modalities.
    • getModalityStr

      public static String getModalityStr(int m)
      Return the string associated with a modality.
      Parameters:
      m - the modality (see the static definitions)
      Returns:
      the string associated with the modality.
    • getNumOfBytesPerPixel

      public static int getNumOfBytesPerPixel(int dataType)
      Returns the number of bytes per pixel based on the data type.
      Parameters:
      dataType - the data type.
      Returns:
      the number of bytes per pixel.
      Throws:
      IllegalArgumentException - DOCUMENT ME!
    • oppositeOrient

      public static int oppositeOrient(int orient)
      Helper method that returns the opposite axis orientation of the one sent in; that is, R2L for L2R, A2P for P2A, etc.
      Parameters:
      orient - DOCUMENT ME!
      Returns:
      int Opposite image orientation
    • sameAxis

      public static boolean sameAxis(int axisA, int axisB)
      Helper method to determine if axis A and axis B are the same axis: that is, if both are the patient x-axis, they will be either R2L or L2R.
      Parameters:
      axisA - Axis A: one of the defined ORI_ types.
      axisB - Axis B: one of the defined ORI_ types.
      Returns:
      boolean true if axis A and axis B are the same axis
    • displayAboutInfo

      public void displayAboutInfo(JDialogBase dialog)
      Displays the file information.
      Parameters:
      dialog - dialog box that is written to
    • displayPrimaryInfo

      public void displayPrimaryInfo(JDialogText dialog, TransMatrix matrix)
      Method called by many extending classes to display basic information in the dialog common to all images.
      Parameters:
      dialog - Area where image information is to be displayed.
      matrix - Transformation matrix
    • getPrimaryInfo

      public String getPrimaryInfo(TransMatrix matrix)
      Method called by many extending classes to return basic information in the dialog common to all images.
      Parameters:
      matrix - Transformation matrix
      Returns:
      The basic image header infomation.
    • finalize

      public void finalize()
      Prepares this class for cleanup.
      Overrides:
      finalize in class Object
    • getAxisDirection

      public int[] getAxisDirection()
      Get the direction for accessing each axis of data. This is based on the values in the axisOrientation array.
      Returns:
      int[] Array of +/-1 values with one entry for each axis. A -1 indicates that the direction is reversed.
    • getAxisOrientation

      public int[] getAxisOrientation()
      Returns orientation of each axis.
      Returns:
      int[] orientation of each axis
      See Also:
    • getAxisOrientation

      public int getAxisOrientation(int axis)
      Returns orientation of entered axis.
      Parameters:
      axis - Axis to get orientation for
      Returns:
      int orientation of specified axis
      See Also:
    • getCompressionType

      public int getCompressionType()
      Gets the compression type.
      Returns:
      the compression type
    • getDataType

      public final int getDataType()
      Returns data type.
      Returns:
      int type of data in file
    • getEndianess

      public final boolean getEndianess()
      Descibes file endianess.
      Returns:
      boolean false = litteEndian format true = bigEndian format
    • getOriginalEndianess

      public final boolean getOriginalEndianess()
    • getExtents

      public final int[] getExtents()
      Returns the dimensionality of the image.
      Returns:
      int[] units (Inches or millimeters);
    • getFileDirectory

      public final String getFileDirectory()
      Returns counter to start of image data.
      Returns:
      String that indicates location of the file
    • getFileFormat

      public final int getFileFormat()
      Returns file format.
      Returns:
      int file format (TIFF, raw, Analyze...)
    • getFileName

      public final String getFileName()
      Returns the file name.
      Returns:
      String indicating file name
    • getFileSuffix

      public final String getFileSuffix()
      Returns the file suffix.
      Returns:
      String representing the filename suffix
    • getImageOrientation

      public final int getImageOrientation()
      Returns the image orientation.
      Returns:
      int representing orientation
    • getIs2_5D

      public final boolean getIs2_5D()
      Return whether or not the image's slices are time based.
      Returns:
      boolean is 2.5 D
    • getLPSOrigin

      public float[] getLPSOrigin()
      DOCUMENT ME!
      Returns:
      float[] LPSOrigin
    • getLUT

      public ModelLUT getLUT()
      Returns the LUT.
    • getMax

      public final double getMax()
      Returns max pixel value of the image.
      Returns:
      double Returns double max pixel value of the image
    • getMaxB

      public final double getMaxB()
      Returns max blue pixel value of the image.
      Returns:
      double Returns double blue max pixel value of the image
    • getMaxG

      public final double getMaxG()
      Returns max green pixel value of the image.
      Returns:
      double Returns double green max pixel value of the image
    • getMaxR

      public final double getMaxR()
      Returns max red pixel value of the image.
      Returns:
      double Returns double red max pixel value of the image
    • getMin

      public final double getMin()
      Returns min pixel value of the image.
      Returns:
      double Returns double min pixel value of the image
    • getMinB

      public final double getMinB()
      Returns min blue pixel value of the image.
      Returns:
      double Returns double blue min pixel value of the image
    • getMinG

      public final double getMinG()
      Returns min green pixel value of the image.
      Returns:
      couble Returns double green min pixel value of the image
    • getMinR

      public final double getMinR()
      Returns min red pixel value of the image.
      Returns:
      couble Returns double red min pixel value of the image
    • getModality

      public final int getModality()
      Returns the modality.
      Returns:
      int indicating modality
    • getMultiFile

      public final boolean getMultiFile()
      Returns whether or not the image is in multiple files (tiff).
      Returns:
      boolean true indicates multiple files, false o.w.
    • getOffset

      public final int getOffset()
      Returns the header offset.
      Returns:
      int header offset
    • getOrigin

      public float[] getOrigin()
      Returns the origin.
      Returns:
      float[] the origin
    • getOrigin

      public float getOrigin(int axis)
      Returns the origin value of the requested axis.
      Parameters:
      axis - requested axis; x is 0, y is 1, z is 2
      Returns:
      float orientation of axis
    • getOriginAtSlice

      public float[] getOriginAtSlice(int slice)
      Gets the origin of a particular slice; resets for the z dimension.
      Parameters:
      slice - Z-dimension slice.
      Returns:
      float[] New start locations
    • getPhotometric

      public final short getPhotometric()
      Photometric interpretion.
      1 indicates 0 is black
      0 indicates 0 is white
      2 RGB
      3 indexed color LUT is saved with image
      4 Transparency Mask
      Returns:
      short Returns interpretation
    • getPixelPadValue

      public final Short getPixelPadValue()
      Returns pixel pad value.
      Returns:
      Short Returns pixel pad value
    • getRescaleIntercept

      public final double getRescaleIntercept()
      Returns the intercept.
      Returns:
      double rescale intercept
    • getRescaleSlope

      public final double getRescaleSlope()
      Returns the slope.
      Returns:
      double rescale slope
    • getResolution

      public final float getResolution(int dim)
      Returns the resolution of the requested dimension.
      Parameters:
      dim - The dimension to return the resolution of.
      Returns:
      The resolution of one of the image dimensions.
    • getResolutions

      public final float[] getResolutions()
      Returns each dimension's resolution.
      Returns:
      float[] dimension resolutions
    • getSize

      public int getSize()
      Returns the size of the slice image in byte which represented by this object.
      Returns:
      the size of the slice image in byte which represented by this object.
    • getSliceThickness

      public final float getSliceThickness()
      Returns the thickness of the image slices.
      Returns:
      slice thickness
    • getUnitsOfMeasure

      public final int[] getUnitsOfMeasure()
      Returns the units of measure.
      Returns:
      int[] units (Inches or millimeters);
    • getUnitsOfMeasure

      public int getUnitsOfMeasure(int dim)
      Returns the units of measure for the given dimension.
      Parameters:
      dim - dimension index
      Returns:
      int units (Inches or millimeters);
    • getVolumeUnitsOfMeasureStr

      public String getVolumeUnitsOfMeasureStr()
      Returns the volume unit for the data. Assumes all three dimensions are the same units.
      Returns:
      String associated volume unit of measure.
    • getAreaUnitsOfMeasureStr

      public String getAreaUnitsOfMeasureStr()
      Returns the area unit for the data. Assumes both dimensions are the same units.
      Returns:
      String associated volume unit of measure.
    • isDicomOrdered

      public boolean isDicomOrdered()
      isDicomOrdered() returns true if the file is in dicom order, false otherwise.
      Returns:
      true if the file is in dicom order, false otherwise
    • setAxisOrientation

      public void setAxisOrientation(int[] axOrient)
      Sets (copies) orientation of each axis.
      Parameters:
      axOrient - axis orientation array
      See Also:
    • setAxisOrientation

      public void setAxisOrientation(int axOrient, int axis)
      Sets the image orientation in the specified axis. Creates the axisOrientation if the array has not yet been created.
      Parameters:
      axOrient - orientation
      axis - axis of orientation; x is 0, y is 1, z is 2.
    • setCompressionType

      public void setCompressionType(int type)
      Sets the compression type.
      Parameters:
      type - compression type
    • setDataType

      public final void setDataType(int type)
      Sets format of image data.
      Parameters:
      type - data type defined in ModelStorageBase
    • setEndianess

      public void setEndianess(boolean endness)
      Describes file endianess.
      Parameters:
      endness - endianess of the file format
    • setOriginalEndianess

      public void setOriginalEndianess(boolean originalEndness)
    • setExtents

      public final void setExtents(int[] dims)
      Sets dimensionality of the images.
      Parameters:
      dims - dimensionality for x,y, and z ... dimensions
    • setExtents

      public void setExtents(int extent, int dim)
      Sets dimensionality for image, on a per dimension basis.
      Parameters:
      extent - Extent of this dimension
      dim - Dimension to set extent in
    • setFileDirectory

      public final void setFileDirectory(String directory)
      DOCUMENT ME!
      Parameters:
      directory - DOCUMENT ME!
    • setFileFormat

      public final void setFileFormat(int format)
      Sets the file format.
      Parameters:
      format - File format
    • setFileName

      public void setFileName(String fname)
      Sets the file name.
      Parameters:
      fname - image file name
    • setFileSuffix

      public final void setFileSuffix(String suffix)
      Sets the file suffix.
      Parameters:
      suffix - file suffix
    • setImageOrientation

      public void setImageOrientation(int orient)
      Sets the image orientation.
      Parameters:
      orient - Orientation.
    • setLUT

      public void setLUT(ModelLUT lut)
      Sets the model lut
      Parameters:
      reference - to the model lut for this file info (often shared between file infos to conserve space
    • setMax

      public void setMax(double Max)
      Sets max pixel value of image.
      Parameters:
      Max - max pixel value
    • setMaxB

      public final void setMaxB(double Max)
      Sets max blue pixel value of image.
      Parameters:
      Max - max blue pixel value
    • setMaxG

      public void setMaxG(double Max)
      Sets max green pixel value of image.
      Parameters:
      Max - max green pixel value
    • setMaxR

      public void setMaxR(double Max)
      Sets max red pixel value of image.
      Parameters:
      Max - max red pixel value
    • setMin

      public final void setMin(double Min)
      Sets min pixel value of image.
      Parameters:
      Min - Min pixel value
    • setMinB

      public final void setMinB(double Min)
      Sets min blue pixel value of image.
      Parameters:
      Min - min blue pixel value
    • setMinG

      public final void setMinG(double Min)
      Sets min green pixel value of image.
      Parameters:
      Min - min green pixel value
    • setMinR

      public final void setMinR(double Min)
      Sets min red pixel value of image.
      Parameters:
      Min - min red pixel value
    • setModality

      public final void setModality(int mod)
      Sets the modality.
      Parameters:
      mod - modality
    • setMultiFile

      public final void setMultiFile(boolean flag)
      Sets the flag for multiple files.
      Parameters:
      flag - true indicates multiple files for image, false o.w.
    • setOffset

      public final void setOffset(int off)
      Sets the header offset.
      Parameters:
      off - the header offset
    • setOrigin

      public void setOrigin(float[] originlocat)
      Sets the origin.
      Parameters:
      originlocat - origin location array
      See Also:
      • invalid reference
        #getStartLocations()
    • setOrigin

      public void setOrigin(float originCoord, int axis)
      Sets the start location in the specified axis. creates the startLocations if the arrray has not yet been created.
      Parameters:
      originCoord - start location
      axis - axis of orientation; x is 0, y is 1, z is 2
      See Also:
      • invalid reference
        #getStartLocations(int)
    • setPhotometric

      public void setPhotometric(short value)
      Sets photometric interpretation.
      1 indicates 0 is black
      0 indicates 0 is white
      2 RGB
      3 indexed color LUT is saved with image
      Parameters:
      value - photometric value
    • setPixelPadValue

      public final void setPixelPadValue(Short value)
      Sets pixel pad value: used in some Dicom images.
      Parameters:
      value - pixel pad value
    • setRescaleIntercept

      public final void setRescaleIntercept(double intercept)
      Sets the rescale intercept.
      Parameters:
      intercept - the intercept
    • setRescaleSlope

      public final void setRescaleSlope(double slope)
      Sets the rescale slope.
      Parameters:
      slope - the slope
    • setResolutions

      public final void setResolutions(float[] resolutions)
      Sets the resolutions of the image.
      Parameters:
      resolutions - resolution object
    • setResolutions

      public final void setResolutions(float resolution, int dim)
      Sets the resolutions of the image, on a per dimension basis.
      Parameters:
      resolution - Resolution for the dimension
      dim - Dimension to set resolution in
    • setSliceThickness

      public void setSliceThickness(float thickness)
      Sets the thickness of the image slices.
      Parameters:
      thickness - The slice thickness.
    • setUnitsOfMeasure

      public final void setUnitsOfMeasure(FileInfoBase.Unit[] unitMeasure)
      Sets (copies) units of measure for image.
      Parameters:
      unitMeasure - unit of measure for a specified dimension
    • setUnitsOfMeasure

      public final void setUnitsOfMeasure(int[] unitMeasure)
      Sets (copies) units of measure for image.
      Parameters:
      unitMeasure - unit of measure for a specified dimension
    • setUnitsOfMeasure

      public final void setUnitsOfMeasure(FileInfoBase.Unit unitMeasure, int dim)
      Sets units of measure for image, on a per dimension basis.
      Parameters:
      unitMeasure - Unit of measure for the dimension
      dim - Dimension to set unit of measure in
    • setUnitsOfMeasure

      public final void setUnitsOfMeasure(int unitMeasure, int dim)
      Sets units of measure for image, on a per dimension basis.
      Parameters:
      unitMeasure - Unit of measure for the dimension
      dim - Dimension to set unit of measure in
    • setTagName

      public void setTagName(Vector<String> tagName)
    • setTagDescription

      public void setTagDescription(Vector<String> tagDescription)
    • setFocalLength

      public void setFocalLength(double focalLength)
    • getFocalLength

      public double getFocalLength()
    • setFocalLength35

      public void setFocalLength35(double focalLength35)
    • getFocalLength35

      public double getFocalLength35()
    • setCameraMake

      public void setCameraMake(String cameraMake)
    • getCameraMake

      public String getCameraMake()
    • setCameraModel

      public void setCameraModel(String cameraModel)
    • getCameraModel

      public String getCameraModel()
    • setExposureTime

      public void setExposureTime(double exposureTime)
    • getExposureTime

      public double getExposureTime()
    • setFNumber

      public void setFNumber(double FNumber)
    • getFNumber

      public double getFNumber()
    • setISOSpeedRating

      public void setISOSpeedRating(double ISOSpeedRating)
    • getISOSpeedRating

      public double getISOSpeedRating()
    • toString

      public String toString()
      Gives the information contained in FileInfo in a string.
      Overrides:
      toString in class Object
      Returns:
      String information contained in the FileInfo object
    • getUnitsOfMeasureAbbrevStr

      public static String getUnitsOfMeasureAbbrevStr(int i)
      Deprecated.
      should now use enum
      Parameters:
      i -
      Returns:
    • getUnitsOfMeasureStr

      public static String getUnitsOfMeasureStr(int xUnits)
      Deprecated.
      should now use enum
      Parameters:
      xUnits -
      Returns:
    • getUnitsOfMeasureFromStr

      public static int getUnitsOfMeasureFromStr(String selectedOutput)
      Deprecated.
      should now use enum
      Parameters:
      selectedOutput -
      Returns:
    • getAllSameDimUnits

      public static int[] getAllSameDimUnits(int measure)
      Deprecated.
      should now use enum
      Parameters:
      selectedOutput -
      Returns:
    • getUnitsOfMeasureAbbrevStr

      public static String[] getUnitsOfMeasureAbbrevStr()
      Deprecated.
      should now use enum
      Return all the abbreviated units of measure strings as an array.
      Returns:
      String[] - array containing the abbreviated strings associated with units of measure.
    • getUnitsOfMeasureStr

      public static String[] getUnitsOfMeasureStr()
      Deprecated.
      should use enum
      Return all the units of measure strings as an array.
      Returns:
      String[] - array containing the strings associated with units of measure.
    • getDTIParameters

      public DTIParameters getDTIParameters()
      Returns:
      the dtiParams
    • setDTIParameters

      public void setDTIParameters(DTIParameters dtiParams)
      Parameters:
      dtiParams - the dtiParams to set