Class DicomReader

java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatReader
loci.formats.SubResolutionFormatReader
loci.formats.in.DicomReader
All Implemented Interfaces:
Closeable, AutoCloseable, loci.formats.IAxisOrientationReader, loci.formats.ICompressedTileReader, loci.formats.IFormatHandler, loci.formats.IFormatReader, loci.formats.IMetadataConfigurable, loci.formats.IPyramidHandler

public class DicomReader extends loci.formats.SubResolutionFormatReader implements loci.formats.IAxisOrientationReader
DicomReader is the file format reader for DICOM files.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final int
     

    Fields inherited from class loci.formats.SubResolutionFormatReader

    core

    Fields inherited from class loci.formats.FormatReader

    coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION

    Fields inherited from class loci.formats.FormatHandler

    COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes

    Fields inherited from interface loci.formats.IFormatReader

    CAN_GROUP, CANNOT_GROUP, MUST_GROUP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new DICOM reader.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean fileOnly)
     
    int
     
    short[][]
     
    byte[][]
     
    loci.formats.Orientation[]
     
     
    int
     
     
    int
     
    int
     
    ome.units.quantity.Length
     
    ome.units.quantity.Length
     
    ome.units.quantity.Length
     
     
     
     
    int
     
    getSeriesUsedFiles(boolean noPixels)
     
    Provide the complete hierarchy of DICOM tags.
    loci.common.Region
    getTileBoundingBox(int no, int x, int y)
     
    loci.formats.codec.Codec
    getTileCodec(int no)
     
    loci.formats.codec.CodecOptions
    getTileCodecOptions(int no, int x, int y)
     
    int
     
    getTileList(int no, loci.common.Region boundingBox, boolean firstTileOnly)
    Get a list of tiles corresponding to the given plane.
    int
    getTileRows(int no)
     
     
    getTiles(int coreIndex)
     
    ome.xml.model.primitives.Timestamp
     
     
    getZOffsets(int coreIndex)
     
    protected void
     
    boolean
     
    boolean
    isThisType(String name, boolean open)
     
    boolean
    isThisType(loci.common.RandomAccessInputStream stream)
     
    byte[]
    openBytes(int no, byte[] buf, int x, int y, int w, int h)
     
    byte[]
    openCompressedBytes(int no, byte[] buf, int x, int y)
     
    byte[]
    openCompressedBytes(int no, int x, int y)
     
    protected org.perf4j.slf4j.Slf4JStopWatch
     

    Methods inherited from class loci.formats.SubResolutionFormatReader

    coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, seriesToCoreIndex, setCoreIndex, setResolution, setSeries

    Methods inherited from class loci.formats.FormatReader

    addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getPixelType, getPixelType, getPossibleDomains, getPulse, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, reopenFile, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataLists

    Methods inherited from class loci.formats.FormatHandler

    checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface loci.formats.IFormatHandler

    getFormat, getNativeDataType, getSuffixes

    Methods inherited from interface loci.formats.IMetadataConfigurable

    getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
  • Field Details

  • Constructor Details

    • DicomReader

      public DicomReader()
      Constructs a new DICOM reader.
  • Method Details

    • getAxisOrientations

      public loci.formats.Orientation[] getAxisOrientations()
      Specified by:
      getAxisOrientations in interface loci.formats.IAxisOrientationReader
    • getTileRows

      public int getTileRows(int no)
      Specified by:
      getTileRows in interface loci.formats.ICompressedTileReader
      Overrides:
      getTileRows in class loci.formats.FormatReader
    • getTileColumns

      public int getTileColumns(int no)
      Specified by:
      getTileColumns in interface loci.formats.ICompressedTileReader
      Overrides:
      getTileColumns in class loci.formats.FormatReader
    • getTileBoundingBox

      public loci.common.Region getTileBoundingBox(int no, int x, int y)
      Specified by:
      getTileBoundingBox in interface loci.formats.ICompressedTileReader
    • openCompressedBytes

      public byte[] openCompressedBytes(int no, int x, int y) throws loci.formats.FormatException, IOException
      Specified by:
      openCompressedBytes in interface loci.formats.ICompressedTileReader
      Throws:
      loci.formats.FormatException
      IOException
    • openCompressedBytes

      public byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws loci.formats.FormatException, IOException
      Specified by:
      openCompressedBytes in interface loci.formats.ICompressedTileReader
      Throws:
      loci.formats.FormatException
      IOException
    • getTileCodec

      public loci.formats.codec.Codec getTileCodec(int no) throws loci.formats.FormatException, IOException
      Specified by:
      getTileCodec in interface loci.formats.ICompressedTileReader
      Throws:
      loci.formats.FormatException
      IOException
    • getTileCodecOptions

      public loci.formats.codec.CodecOptions getTileCodecOptions(int no, int x, int y) throws loci.formats.FormatException, IOException
      Specified by:
      getTileCodecOptions in interface loci.formats.ICompressedTileReader
      Throws:
      loci.formats.FormatException
      IOException
    • isThisType

      public boolean isThisType(String name, boolean open)
      Specified by:
      isThisType in interface loci.formats.IFormatReader
      Overrides:
      isThisType in class loci.formats.FormatReader
    • isThisType

      public boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
      Specified by:
      isThisType in interface loci.formats.IFormatReader
      Overrides:
      isThisType in class loci.formats.FormatReader
      Throws:
      IOException
    • getRequiredDirectories

      public int getRequiredDirectories(String[] files) throws loci.formats.FormatException, IOException
      Specified by:
      getRequiredDirectories in interface loci.formats.IFormatReader
      Overrides:
      getRequiredDirectories in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • get8BitLookupTable

      public byte[][] get8BitLookupTable()
      Specified by:
      get8BitLookupTable in interface loci.formats.IFormatReader
      Overrides:
      get8BitLookupTable in class loci.formats.FormatReader
    • get16BitLookupTable

      public short[][] get16BitLookupTable()
      Specified by:
      get16BitLookupTable in interface loci.formats.IFormatReader
      Overrides:
      get16BitLookupTable in class loci.formats.FormatReader
    • getSeriesUsedFiles

      public String[] getSeriesUsedFiles(boolean noPixels)
      Specified by:
      getSeriesUsedFiles in interface loci.formats.IFormatReader
      Overrides:
      getSeriesUsedFiles in class loci.formats.FormatReader
    • fileGroupOption

      public int fileGroupOption(String id) throws loci.formats.FormatException, IOException
      Specified by:
      fileGroupOption in interface loci.formats.IFormatReader
      Overrides:
      fileGroupOption in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • getOptimalTileWidth

      public int getOptimalTileWidth()
      Specified by:
      getOptimalTileWidth in interface loci.formats.IFormatReader
      Overrides:
      getOptimalTileWidth in class loci.formats.FormatReader
    • getOptimalTileHeight

      public int getOptimalTileHeight()
      Specified by:
      getOptimalTileHeight in interface loci.formats.IFormatReader
      Overrides:
      getOptimalTileHeight in class loci.formats.FormatReader
    • openBytes

      public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException
      Specified by:
      openBytes in interface loci.formats.IFormatReader
      Specified by:
      openBytes in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
      See Also:
      • IFormatReader.openBytes(int, byte[], int, int, int, int)
    • close

      public void close(boolean fileOnly) throws IOException
      Specified by:
      close in interface loci.formats.IFormatReader
      Overrides:
      close in class loci.formats.SubResolutionFormatReader
      Throws:
      IOException
    • initFile

      protected void initFile(String id) throws loci.formats.FormatException, IOException
      Overrides:
      initFile in class loci.formats.SubResolutionFormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • getTileList

      public List<DicomTile> getTileList(int no, loci.common.Region boundingBox, boolean firstTileOnly)
      Get a list of tiles corresponding to the given plane. If the bounding box is not null, then only tiles intersecting with the bounding box will be returned. If the "firstTileOnly" flag is set, then this will return as soon as one matching tile is found.
    • getImageType

      public String getImageType()
    • getTiles

      public List<DicomTile> getTiles()
    • getTiles

      public List<DicomTile> getTiles(int coreIndex)
    • getZOffsets

      public List<Double> getZOffsets()
    • getZOffsets

      public List<Double> getZOffsets(int coreIndex)
    • getConcatenationIndex

      public int getConcatenationIndex()
    • getPixelSizeX

      public ome.units.quantity.Length getPixelSizeX()
    • getPixelSizeY

      public ome.units.quantity.Length getPixelSizeY()
    • getPixelSizeZ

      public ome.units.quantity.Length getPixelSizeZ()
    • getPositionX

      public List<Double> getPositionX()
    • getPositionY

      public List<Double> getPositionY()
    • getPositionZ

      public List<Double> getPositionZ()
    • getChannelNames

      public List<String> getChannelNames()
    • isExtendedDepthOfField

      public boolean isExtendedDepthOfField()
    • getTimestamp

      public ome.xml.model.primitives.Timestamp getTimestamp()
    • getTags

      public List<DicomTag> getTags()
      Provide the complete hierarchy of DICOM tags. Applications that need to query or display the complete tag structure should use this method to retrieve tags instead of relying upon original metadata.
    • stopWatch

      protected org.perf4j.slf4j.Slf4JStopWatch stopWatch()