Package com.pixelmed.dicom
Class TiledFramesIndex
java.lang.Object
com.pixelmed.dicom.TiledFramesIndex
The TiledFramesIndex class ... .
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]protected int[][]protected booleanprotected booleanprotected booleanprotected booleanprotected intprotected intprotected intprotected int[]protected doubleprotected doubleprotected double[][]protected double[][]protected double[][] -
Constructor Summary
ConstructorsConstructorDescriptionIndex the tiles by row and column positionTiledFramesIndex(AttributeList list, boolean extractPhysicalOffsets, boolean buildInverseIndex, boolean ignorePlanePosition) Index the tiles by row and column positionTiledFramesIndex(AttributeList list, boolean extractPhysicalOffsets, boolean buildInverseIndex, boolean ignorePlanePosition, boolean checkPhysicalOffsets, double checkPhysicalOffsetPixelSpacingRelativeThreshold) Index the tiles by row and column position -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintgetColumn(int frame) Get the column number for the specified frameintgetFrameNumber(int row, int column) Get the frame number for the tile at the specified row and columnintintintgetRow(int frame) Get the row number for the specified framebooleanIs the encoded matrix of tiles organized in a standard raster pattern?booleanisSparse()Is the encoded matrix of tiles sparse?static voidRead the DICOM input file as a list of attributes, create and index of the tiled frames, and dump it.toString()Dump the contents of the index as a human-readable string.
-
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 ImageextractPhysicalOffsets- extract the physical as well as logical positionbuildInverseIndex- build the inverse index rather than waiting until it is neededignorePlanePosition- 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 ImageextractPhysicalOffsets- extract the physical as well as logical positionbuildInverseIndex- build the inverse index rather than waiting until it is neededignorePlanePosition- ignore the PlanePositionSequence and assume frame order is normal rastercheckPhysicalOffsets- check that the physical offsets match what is predicted from the origin, logical position and spacingcheckPhysicalOffsetPixelSpacingRelativeThreshold- threshold as fraction of pixel spacing for match- Throws:
DicomException- if insufficient or inconsistent information
-
TiledFramesIndex
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 0column- 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
Dump the contents of the index as a human-readable string.
-
main
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),
-