Package com.pixelmed.apps
Class TiledPyramid
- java.lang.Object
-
- com.pixelmed.apps.TiledPyramid
-
public class TiledPyramid extends java.lang.ObjectTake a single high resolution tiled image and downsample it by successive factors of two to produce a multi-resolution pyramid set of images.
-
-
Field Summary
Fields Modifier and Type Field Description protected UIDGeneratorgenerator
-
Constructor Summary
Constructors Constructor Description TiledPyramid(java.lang.String inputfilename, java.lang.String outputPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidcopyFunctionalGroupsSequenceWithDownsampledValues(AttributeList list, AttributeList newList, TiledFramesIndex index, int oldNumberOfFrames, int newNumberOfFrames, int newNumberOfColumnsOfTiles, int newNumberOfRowsOfTiles, int columns, int rows)static voidcreateDownsampledDICOMAttributes(AttributeList list, AttributeList newList, TiledFramesIndex index, java.lang.String outputformat, boolean populateunchangedimagepixeldescriptionmacroattributes, boolean populatefunctionalgroups)java.io.FilecreateDownsampledDICOMFile(java.io.File inputFile, java.io.File outputFolder)protected static voiddownsamplePixelData(AttributeList list, AttributeList newList, TiledFramesIndex index, int oldNumberOfFrames, int newNumberOfFrames, int oldTotalPixelMatrixColumns, int oldTotalPixelMatrixRows, int oldNumberOfColumnsOfTiles, int oldNumberOfRowsOfTiles, int newNumberOfColumnsOfTiles, int newNumberOfRowsOfTiles, int columns, int rows, java.lang.String outputFormat)static voidmain(java.lang.String[] arg)Take a single high resolution tiled image and downsample it by successive factors of two to produce multi-resolution pyramid set of images.static voidsetClipRectForIncompletelyFilledTilesIfNecessary(SourceImage sImg, TiledFramesIndex index, int numberOfColumnsOfTiles, int numberOfRowsOfTiles, int totalPixelMatrixColumns, int totalPixelMatrixRows, int columns, int rows)static voidsetClipRectForIncompletelyFilledTilesIfNecessary(SourceImage sImg, TiledFramesIndex index, AttributeList list)protected static voidupdateImageOrFrameType(AttributeList list, AttributeList newList, AttributeTag t)
-
-
-
Field Detail
-
generator
protected UIDGenerator generator
-
-
Constructor Detail
-
TiledPyramid
public TiledPyramid(java.lang.String inputfilename, java.lang.String outputPath) throws DicomException, java.io.IOException- Throws:
DicomExceptionjava.io.IOException
-
-
Method Detail
-
updateImageOrFrameType
protected static void updateImageOrFrameType(AttributeList list, AttributeList newList, AttributeTag t) throws DicomException
- Throws:
DicomException
-
copyFunctionalGroupsSequenceWithDownsampledValues
protected static void copyFunctionalGroupsSequenceWithDownsampledValues(AttributeList list, AttributeList newList, TiledFramesIndex index, int oldNumberOfFrames, int newNumberOfFrames, int newNumberOfColumnsOfTiles, int newNumberOfRowsOfTiles, int columns, int rows) throws DicomException
- Throws:
DicomException
-
setClipRectForIncompletelyFilledTilesIfNecessary
public static void setClipRectForIncompletelyFilledTilesIfNecessary(SourceImage sImg, TiledFramesIndex index, AttributeList list) throws DicomException
- Throws:
DicomException
-
setClipRectForIncompletelyFilledTilesIfNecessary
public static void setClipRectForIncompletelyFilledTilesIfNecessary(SourceImage sImg, TiledFramesIndex index, int numberOfColumnsOfTiles, int numberOfRowsOfTiles, int totalPixelMatrixColumns, int totalPixelMatrixRows, int columns, int rows)
-
downsamplePixelData
protected static void downsamplePixelData(AttributeList list, AttributeList newList, TiledFramesIndex index, int oldNumberOfFrames, int newNumberOfFrames, int oldTotalPixelMatrixColumns, int oldTotalPixelMatrixRows, int oldNumberOfColumnsOfTiles, int oldNumberOfRowsOfTiles, int newNumberOfColumnsOfTiles, int newNumberOfRowsOfTiles, int columns, int rows, java.lang.String outputFormat) throws DicomException, java.io.IOException
- Throws:
DicomExceptionjava.io.IOException
-
createDownsampledDICOMAttributes
public static void createDownsampledDICOMAttributes(AttributeList list, AttributeList newList, TiledFramesIndex index, java.lang.String outputformat, boolean populateunchangedimagepixeldescriptionmacroattributes, boolean populatefunctionalgroups) throws DicomException, java.io.IOException
- Throws:
DicomExceptionjava.io.IOException
-
createDownsampledDICOMFile
public java.io.File createDownsampledDICOMFile(java.io.File inputFile, java.io.File outputFolder) throws DicomException, java.io.IOException- Throws:
DicomExceptionjava.io.IOException
-
main
public static void main(java.lang.String[] arg)
Take a single high resolution tiled image and downsample it by successive factors of two to produce multi-resolution pyramid set of images.
- Parameters:
arg- array of two strings - the source image and the target directory (which must already exist)
-
-