Package loci.formats.out
Class DicomWriter
java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatWriter
loci.formats.out.DicomWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,loci.formats.ICompressedTileWriter,loci.formats.IFormatHandler,loci.formats.IFormatWriter,loci.formats.IMetadataConfigurable,loci.formats.IPyramidHandler,IExtraMetadataWriter
DicomWriter is the file format writer for DICOM files.
This is designed for whole slide images, and may not produce
schema-compliant files for other modalities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOption for turning off TIFF metadata.static final Stringstatic final StringOption for setting the organization root for UIDs.Fields inherited from class loci.formats.FormatWriter
cm, compression, compressionTypes, fps, initialized, interleaved, metadataRetrieve, options, out, resolution, resolutionData, sequential, series, validBitsFields inherited from class loci.formats.FormatHandler
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()getCodec()int[]getPixelTypes(String codec) intintvoidsaveBytes(int no, byte[] buf, int x, int y, int w, int h) voidsaveCompressedBytes(int no, byte[] buf, int x, int y, int w, int h) voidsetBigTiff(boolean bigTiff) Sets whether or not BigTIFF files should be written.voidsetExtraMetadata(String tagSource) Provide additional metadata that should be written as part of this dataset.voidvoidsetResolution(int r) voidsetSeries(int s) intsetTileSizeX(int tileSize) intsetTileSizeY(int tileSize) protected Slf4JStopWatchbooleanChecks the writer's associated MetadataOptions to see if dual personality writing has been explicitly enabled or disabled.Methods inherited from class loci.formats.FormatWriter
changeOutputFile, checkParams, createOutputStream, getCodecOptions, getColorModel, getCompression, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getPlaneCount, getPlaneCount, getResolution, getResolutionCount, getResolutions, getSamplesPerPixel, getSamplesPerPixel, getSeries, getSizeX, getSizeY, hasResolutions, isFullPlane, isInterleaved, isSupportedType, saveBytes, saveBytes, savePlane, savePlane, savePlane, seekToPlaneOffset, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setInterleaved, setMetadataRetrieve, setResolutions, setValidBitsPerPixel, setWriteSequentiallyMethods inherited from class loci.formats.FormatHandler
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, isThisType, setMetadataOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.formats.IFormatHandler
getFormat, getNativeDataType, getSuffixes, isThisTypeMethods inherited from interface loci.formats.IMetadataConfigurable
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
-
Field Details
-
UID_ROOT_KEY
Option for setting the organization root for UIDs.- See Also:
-
UID_DEFAULT_ROOT
- See Also:
-
TIFF_KEY
Option for turning off TIFF metadata.- See Also:
-
-
Constructor Details
-
DicomWriter
public DicomWriter()
-
-
Method Details
-
setExtraMetadata
Description copied from interface:IExtraMetadataWriterProvide additional metadata that should be written as part of this dataset. Primarily intended for DicomWriter. Calling this method is optional. Multiple calls are allowed, e.g. if tags come from multiple external sources. If multiple calls to this method are made then the order matters, with earlier calls implying higher priority when resolving duplicate or conflicting tags. All calls to this method must occur before setId is called.- Specified by:
setExtraMetadatain interfaceIExtraMetadataWriter
-
setBigTiff
public void setBigTiff(boolean bigTiff) Sets whether or not BigTIFF files should be written. This flag is not reset when close() is called. -
writeDualPersonality
public boolean writeDualPersonality()Checks the writer's associated MetadataOptions to see if dual personality writing has been explicitly enabled or disabled. If the option is not set, the default is to return true, enabling dual personality writing. -
setSeries
- Specified by:
setSeriesin interfaceloci.formats.IFormatWriter- Overrides:
setSeriesin classloci.formats.FormatWriter- Throws:
loci.formats.FormatException
-
setResolution
public void setResolution(int r) - Specified by:
setResolutionin interfaceloci.formats.IPyramidHandler- Overrides:
setResolutionin classloci.formats.FormatWriter
-
getCodec
- Specified by:
getCodecin interfaceloci.formats.ICompressedTileWriter
-
saveCompressedBytes
public void saveCompressedBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException - Specified by:
saveCompressedBytesin interfaceloci.formats.ICompressedTileWriter- Throws:
loci.formats.FormatExceptionIOException
-
saveBytes
public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException - Specified by:
saveBytesin interfaceloci.formats.IFormatWriter- Throws:
loci.formats.FormatExceptionIOException- See Also:
-
canDoStacks
public boolean canDoStacks()- Specified by:
canDoStacksin interfaceloci.formats.IFormatWriter- Overrides:
canDoStacksin classloci.formats.FormatWriter
-
getPixelTypes
- Specified by:
getPixelTypesin interfaceloci.formats.IFormatWriter- Overrides:
getPixelTypesin classloci.formats.FormatWriter
-
setId
- Specified by:
setIdin interfaceloci.formats.IFormatHandler- Overrides:
setIdin classloci.formats.FormatWriter- Throws:
loci.formats.FormatExceptionIOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classloci.formats.FormatWriter- Throws:
IOException
-
setTileSizeX
- Specified by:
setTileSizeXin interfaceloci.formats.IFormatWriter- Overrides:
setTileSizeXin classloci.formats.FormatWriter- Throws:
loci.formats.FormatException
-
getTileSizeX
public int getTileSizeX()- Specified by:
getTileSizeXin interfaceloci.formats.IFormatWriter- Overrides:
getTileSizeXin classloci.formats.FormatWriter
-
setTileSizeY
- Specified by:
setTileSizeYin interfaceloci.formats.IFormatWriter- Overrides:
setTileSizeYin classloci.formats.FormatWriter- Throws:
loci.formats.FormatException
-
getTileSizeY
public int getTileSizeY()- Specified by:
getTileSizeYin interfaceloci.formats.IFormatWriter- Overrides:
getTileSizeYin classloci.formats.FormatWriter
-
getUIDRoot
-
stopWatch
-