Class TiledFramesIndex

java.lang.Object
com.pixelmed.dicom.TiledFramesIndex

public class TiledFramesIndex extends Object

The TiledFramesIndex class ... .

  • Field Details

    • index

      protected int[][] index
    • xOffsetInSlideCoordinateSystem

      protected double[][] xOffsetInSlideCoordinateSystem
    • yOffsetInSlideCoordinateSystem

      protected double[][] yOffsetInSlideCoordinateSystem
    • zOffsetInSlideCoordinateSystem

      protected double[][] zOffsetInSlideCoordinateSystem
    • numberOfColumnsOfTiles

      protected int numberOfColumnsOfTiles
    • numberOfRowsOfTiles

      protected int numberOfRowsOfTiles
    • numberOfFrames

      protected int numberOfFrames
    • totalPixelMatrixXOffsetInSlideCoordinateSystem

      protected double totalPixelMatrixXOffsetInSlideCoordinateSystem
    • totalPixelMatrixYOffsetInSlideCoordinateSystem

      protected double totalPixelMatrixYOffsetInSlideCoordinateSystem
    • rowForFrame

      protected int[] rowForFrame
    • columnForFrame

      protected int[] columnForFrame
    • isSparse

      protected boolean isSparse
    • isSparseHasBeenTested

      protected boolean isSparseHasBeenTested
    • isEncodedInStandardRasterOrder

      protected boolean isEncodedInStandardRasterOrder
    • isEncodedInStandardRasterOrderHasBeenTested

      protected boolean isEncodedInStandardRasterOrderHasBeenTested
  • Constructor Details

    • TiledFramesIndex

      public TiledFramesIndex(AttributeList list, boolean extractPhysicalOffsets, boolean buildInverseIndex, boolean ignorePlanePosition) throws DicomException

      Index the tiles by row and column position

      Parameters:
      list - an AttributeList for a Whole Slide Image
      extractPhysicalOffsets - extract the physical as well as logical position
      buildInverseIndex - build the inverse index rather than waiting until it is needed
      ignorePlanePosition - ignore the PlanePositionSequence and assume frame order is normal raster
      Throws:
      DicomException - if insufficient or inconsistent information
    • TiledFramesIndex

      public TiledFramesIndex(AttributeList list, boolean extractPhysicalOffsets, boolean buildInverseIndex, boolean ignorePlanePosition, boolean checkPhysicalOffsets, double checkPhysicalOffsetPixelSpacingRelativeThreshold) throws DicomException

      Index the tiles by row and column position

      Parameters:
      list - an AttributeList for a Whole Slide Image
      extractPhysicalOffsets - extract the physical as well as logical position
      buildInverseIndex - build the inverse index rather than waiting until it is needed
      ignorePlanePosition - ignore the PlanePositionSequence and assume frame order is normal raster
      checkPhysicalOffsets - check that the physical offsets match what is predicted from the origin, logical position and spacing
      checkPhysicalOffsetPixelSpacingRelativeThreshold - threshold as fraction of pixel spacing for match
      Throws:
      DicomException - if insufficient or inconsistent information
    • TiledFramesIndex

      public TiledFramesIndex(AttributeList list) throws DicomException

      Index the tiles by row and column position

      Parameters:
      list - an AttributeList for a Whole Slide Image
      Throws:
      DicomException - if insufficient or inconsistent information
  • Method Details

    • getNumberOfColumnsOfTiles

      public int getNumberOfColumnsOfTiles()
    • getNumberOfRowsOfTiles

      public int getNumberOfRowsOfTiles()
    • getFrameNumber

      public int getFrameNumber(int row, int column)

      Get the frame number for the tile at the specified row and column

      Parameters:
      row - the number of the tile along the column direction (which row of tiles), numbered from 0
      column - the number of the tile along the row direction (which column of tiles), numbered from 0
      Returns:
      the frame number from 1, or 0 if no frame
      Throws:
      ArrayIndexOutOfBoundsException - if row or column beyond limits of tile array
    • computeRowAndColumnForFrame

      protected void computeRowAndColumnForFrame()
    • getRow

      public int getRow(int frame)

      Get the row number for the specified frame

      Parameters:
      frame - the frame number from 1
      Returns:
      row the number of the tile along the column direction (which row of tiles), numbered from 0
      Throws:
      ArrayIndexOutOfBoundsException - if frame number is beyond limits of tile array
    • getColumn

      public int getColumn(int frame)

      Get the column number for the specified frame

      Parameters:
      frame - the frame number from 1
      Returns:
      column the number of the tile along the row direction (which column of tiles), numbered from 0
      Throws:
      ArrayIndexOutOfBoundsException - if frame number is beyond limits of tile array
    • isSparse

      public boolean isSparse()

      Is the encoded matrix of tiles sparse?

      Returns:
      true if any tile position does not have an encoded frame
    • isEncodedInStandardRasterOrder

      public boolean isEncodedInStandardRasterOrder()

      Is the encoded matrix of tiles organized in a standard raster pattern?

      The standard pattern is all the columns of the first row from left to right, then the second row, etc.

      Returns:
      true if in the standard raster order
    • toString

      public String toString()

      Dump the contents of the index as a human-readable string.

      Overrides:
      toString in class Object
      Returns:
      the string
    • main

      public static void main(String[] arg)

      Read the DICOM input file as a list of attributes, create and index of the tiled frames, and dump it.

      Parameters:
      arg - array of one string (the filename to read and dump),