Class FileInfoMincHDF

All Implemented Interfaces:
Serializable, Cloneable

public class FileInfoMincHDF extends FileInfoBase
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • dimensionNode

      private transient DefaultMutableTreeNode dimensionNode
      The dimension tree node that holds xspace, yspace, and (optionally) zspace nodes
    • informationNode

      private transient DefaultMutableTreeNode informationNode
      The information node that holds acquisition information, dicom tags, and more
    • imageNode

      private transient 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 Hashtable<String,String> dicomTable
      Hashtable to hold the tags for conversion to->from dicom and to-> mipav XML format
  • Constructor Details

    • FileInfoMincHDF

      public FileInfoMincHDF(String name, String directory, int format)
      MINC file information constructor.
      Parameters:
      name - file name
      directory - file directory
      format - format (in this case, MINC)
  • Method Details

    • convertTagsToTable

      public Hashtable<String,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 class FileInfoBase
      Parameters:
      dlog - where to display the info
      matrix - the transformation matrix
    • setDimensionNode

      public void setDimensionNode(DefaultMutableTreeNode dimNode)
      Sets the dimension node (xspace, yspace and optional zspace nodes)
      Parameters:
      dimNode - the dimension node
    • getDimensionNode

      public DefaultMutableTreeNode getDimensionNode()
      Returns the dimension node (only 1 exists at fileinfo[0] position
      Returns:
      the dimension node
    • setInfoNode

      public void setInfoNode(DefaultMutableTreeNode infoNode)
      Sets the information node (includes dicom tags and patient info
      Parameters:
      infoNode - the information node
    • getInfoNode

      public DefaultMutableTreeNode getInfoNode()
      Returns the information node with dicom/patient info
      Returns:
      the information node
    • setImageNode

      public void setImageNode(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 DefaultMutableTreeNode getImageNode()
      Returns the image node (image info and data)
      Returns:
      the image node
    • setModality

      public void setModality(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(Hashtable<String,String> dTable)
      Sets the dicom converted tag hashtable
      Parameters:
      dTable - hashtable holding dicom keys and tags
    • getDicomTable

      public Hashtable<String,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 matrix
      isCentered - is the axis centered
      slice - the slice number
      mincStartLoc - 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 -