Class FileZVI


  • public class FileZVI
    extends FileBase
    Documentation used was the ZVI Format Specification V 2.0.5 - August, 2010. The following email was sent to Zeiss support: Here are problems I spotted in ZVI Format Specification V 2.0.5 - August, 2010: 2.1.1 stream of the container image: TypeDescription is VT_EMPTY rather than VT_BSTR FileName is VT_EMPTY rather than VT_BSTR m_PluginCLSID is VT_BLOB rather than VT_CLSID The {Tags} VT_STORED_OBJECT that goes between the {Layers} and {Scaling} VT_STORED_OBJECTs is missing. 2.2.1 stream of the image item: Version is used rather than unused with minor = 1003 hex and major = 3000 hex. TypeDescription is VT_EMPTY rather than VT_BSTR. FileName is VT_EMPTY rather than VT_BSTR m_PluginCLSID is VT_BLOB rather than VT_CLSID Items after the {Others} VT_BLOB are completely different from what's listed. I find: VT_DISPATCH VT_STORED_OBJECT with a string = Tags VT_DISPATCH VT_DISPATCH VT_DISPATCH RAW pixel data 3.3 Coordinate ID for Image Dimensions: Index should be 0 1 2 3 4 5 6 7 instead of the existing 0 1 3 4 5 6 7 8. 3.4 Tag IDs ID 301 is used for both ImageBaseTimeFirst and ImageBaseTime1. I suspect the ImageBaseTimeFirst entry should be deleted. The following tags show up in .ZVI files but are not listed in your table: 2071, 20478. What is the info for these tags? 65781 has both AuroxCamRes6 and AuroxCamCFactor. Information for decoding the 64-bit VT_DATE structure is missing. Is it available somewhere? Is it possible for me to obtain sample .ZVI files so I can improve the ZVI file read in the MIPAV image processing program? Sincerely, William Gandler
    • Field Detail

      • file

        private java.io.File file
        DOCUMENT ME!
      • fileDir

        private java.lang.String fileDir
        DOCUMENT ME!
      • fileName

        private java.lang.String fileName
        DOCUMENT ME!
      • imageExtents

        private int[] imageExtents
        DOCUMENT ME!
      • imgBuffer

        private float[] imgBuffer
        DOCUMENT ME!
      • imgResols

        private float[] imgResols
        DOCUMENT ME!
      • LUT

        private ModelLUT LUT
        DOCUMENT ME!
      • endianess

        private boolean endianess
      • sectorSize

        private int sectorSize
      • shortSectorSize

        private int shortSectorSize
      • shortSectorTable

        private int[] shortSectorTable
      • shortStreamStartSect

        private int shortStreamStartSect
      • totalShortStreamSize

        private long totalShortStreamSize
      • imageWidth

        private int imageWidth
      • imageHeight

        private int imageHeight
      • imageCount

        private int imageCount
      • imagePixelFormat

        private int imagePixelFormat
      • zDim

        private int zDim
      • backupZDim

        private int backupZDim
      • tDim

        private int tDim
      • channelNumber

        private int channelNumber
      • positionNumber

        private int positionNumber
      • zArray

        private int[] zArray
      • cArray

        private int[] cArray
      • tArray

        private int[] tArray
      • positionArray

        private int[] positionArray
      • startSectorArray

        private int[] startSectorArray
      • offsetArray

        private int[] offsetArray
      • ap

        private int ap
      • imageFocusPositionArray

        private double[] imageFocusPositionArray
      • imageStagePositionXArray

        private double[] imageStagePositionXArray
      • imageZXArray

        private int[] imageZXArray
      • imageZYArray

        private int[] imageZYArray
      • imageStagePositionYArray

        private double[] imageStagePositionYArray
      • imageOriginalStagePositionXArray

        private double[] imageOriginalStagePositionXArray
      • imageOriginalZXArray

        private int[] imageOriginalZXArray
      • imageOriginalZYArray

        private int[] imageOriginalZYArray
      • imageOriginalStagePositionYArray

        private double[] imageOriginalStagePositionYArray
      • imageZArray

        private int[] imageZArray
      • imageZ2Array

        private int[] imageZ2Array
      • imageC2Array

        private int[] imageC2Array
      • imageT2Array

        private int[] imageT2Array
      • imageBlackValueArray

        private double[] imageBlackValueArray
      • imageZ3Array

        private int[] imageZ3Array
      • imageC3Array

        private int[] imageC3Array
      • imageT3Array

        private int[] imageT3Array
      • imageWhiteValueArray

        private double[] imageWhiteValueArray
      • imageRelFocusPosition1Array

        private double[] imageRelFocusPosition1Array
      • imageZ4Array

        private int[] imageZ4Array
      • imageRelFocusPosition2Array

        private double[] imageRelFocusPosition2Array
      • imageZ5Array

        private int[] imageZ5Array
      • cameraImageAcquisitionTime

        private double[] cameraImageAcquisitionTime
      • imageZ6Array

        private int[] imageZ6Array
      • imageC6Array

        private int[] imageC6Array
      • imageT6Array

        private int[] imageT6Array
      • imageRelativeTime

        private double[] imageRelativeTime
      • imageZ7Array

        private int[] imageZ7Array
      • imageC7Array

        private int[] imageC7Array
      • imageT7Array

        private int[] imageT7Array
      • icp

        private int icp
      • icp2

        private int icp2
      • icp3

        private int icp3
      • icp4

        private int icp4
      • icp5

        private int icp5
      • icp6

        private int icp6
      • icp7

        private int icp7
      • icpX

        private int icpX
      • icpY

        private int icpY
      • icpOriginalX

        private int icpOriginalX
      • icpOriginalY

        private int icpOriginalY
      • sat

        private int[] sat
      • add128

        private boolean add128
      • minC

        private int minC
      • maxC

        private int maxC
      • minZ

        private int minZ
      • maxZ

        private int maxZ
      • minT

        private int minT
      • maxT

        private int maxT
      • minPosition

        private int minPosition
      • maxPosition

        private int maxPosition
    • Constructor Detail

      • FileZVI

        public FileZVI​(java.lang.String fileName,
                       java.lang.String fileDir)
                throws java.io.IOException
        ZVI reader constructor.
        Parameters:
        fileName - file name
        fileDir - file directory
        Throws:
        java.io.IOException - if there is an error making the file
    • Method Detail

      • finalize

        public void finalize()
        Prepares this class for cleanup. Calls the finalize method for existing elements, closes any open files and sets other elements to null.
        Overrides:
        finalize in class FileBase
      • getFileInfo

        public FileInfoBase getFileInfo()
        Accessor that returns the file info.
        Returns:
        FileInfoBase containing the file info
      • getImageBuffer

        public float[] getImageBuffer()
        Accessor that returns the image buffer.
        Returns:
        buffer of image.
      • getModelLUT

        public ModelLUT getModelLUT()
        Rreturns LUT if defined.
        Returns:
        the LUT if defined else it is null
      • readImage

        public ModelImage readImage​(boolean multiFile,
                                    boolean one)
                             throws java.io.IOException
        Reads the LIFF header which indicates endianess, the TIFF magic number, and the offset in bytes of the first IFD. It then reads all the IFDs. This method then opens a Model of an image and imports the the images one slice at a time. Image slices are separated by an IFD.
        Parameters:
        multiFile - true if a set of files each containing a separate 2D image is present false if one file with either a 2D image or a stack of 2D images
        one - true if only want to read in one image of the 3D set
        Returns:
        returns the image
        Throws:
        java.io.IOException - if there is an error reading the file
      • readHeader

        public boolean readHeader()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • zviToMipavMeasurementUnits

        private int zviToMipavMeasurementUnits​(int zviScalingUnit)
      • displayPixelFormat

        private void displayPixelFormat​(int pixelFormat)
      • calculateTimeStampString

        java.lang.String calculateTimeStampString​(long timeStamp)
      • calculateVTDateTimeString

        private java.lang.String calculateVTDateTimeString​(double dateTime)
      • calculateRelativeTime

        private java.lang.String calculateRelativeTime​(double relativeTime)