Class FileInfoMincHDF

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class FileInfoMincHDF
    extends FileInfoBase
    See Also:
    Serialized Form
    • Field Detail

      • 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
    • Constructor Detail

      • FileInfoMincHDF

        public FileInfoMincHDF​(java.lang.String name,
                               java.lang.String directory,
                               int format)
        MINC file information constructor.
        Parameters:
        name - file name
        directory - file directory
        format - format (in this case, MINC)
    • 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 class FileInfoBase
        Parameters:
        dlog - where to display the info
        matrix - 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 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 -