public class SourceImage
extends java.lang.Object
A class that encapsulates the pixel data and features and values from an image source (such as a DICOM image), usually for the purpose of displaying it.
SingleImagePanel
Modifier and Type | Field and Description |
---|---|
protected com.pixelmed.display.SourceImage.BufferedImageSource |
bufferedImageSource |
protected java.nio.MappedByteBuffer |
memoryMappedByteBuffer |
protected java.nio.channels.FileChannel |
memoryMappedFileChannel |
protected java.io.FileInputStream |
memoryMappedFileInputStream |
protected static int |
memoryMapperNumberOfRetries |
protected static int |
memoryMapperRetriesBeforeSleeping |
protected static int |
memoryMapperSleepTimeBetweenRetries |
Modifier | Constructor and Description |
---|---|
protected |
SourceImage()
Allow subclasses to have their own constructors.
|
|
SourceImage(AttributeList list)
Construct an image from a single or multi-frame DICOM image from
a list of DICOM attributes.
|
|
SourceImage(DicomInputStream i)
Construct an image from a single or multi-frame DICOM image from
an input stream (such as from a file or the network).
|
|
SourceImage(java.io.InputStream i,
int w,
int h,
int depth)
Construct a single-frame image from an unsigned raw image (no header) on
an input stream with the specified width, height and bit depth.
|
|
SourceImage(java.io.InputStream i,
int w,
int h,
int depth,
int frames)
Construct a multi-frame image from an unsigned raw image (no header) on
an input stream with the specified width, height and bit depth.
|
|
SourceImage(java.lang.String filename)
Construct an image from a single or multi-frame DICOM image from
a file.
|
protected com.pixelmed.display.SourceImage.BufferedImageSource bufferedImageSource
protected java.io.FileInputStream memoryMappedFileInputStream
protected java.nio.channels.FileChannel memoryMappedFileChannel
protected java.nio.MappedByteBuffer memoryMappedByteBuffer
protected static int memoryMapperNumberOfRetries
protected static int memoryMapperSleepTimeBetweenRetries
protected static int memoryMapperRetriesBeforeSleeping
protected SourceImage()
Allow subclasses to have their own constructors.
public SourceImage(java.io.InputStream i, int w, int h, int depth) throws java.io.IOException
Construct a single-frame image from an unsigned raw image (no header) on an input stream with the specified width, height and bit depth.
i
- the input streamw
- image widthh
- image heightdepth
- bit depthjava.io.IOException
public SourceImage(java.io.InputStream i, int w, int h, int depth, int frames) throws java.io.IOException
Construct a multi-frame image from an unsigned raw image (no header) on an input stream with the specified width, height and bit depth.
i
- the input streamw
- image widthh
- image heightdepth
- bit depthframes
- number of framesjava.io.IOException
public SourceImage(java.lang.String filename) throws java.io.IOException, DicomException
Construct an image from a single or multi-frame DICOM image from a file.
filename
- java.io.IOException
DicomException
public SourceImage(DicomInputStream i) throws java.io.IOException, DicomException
Construct an image from a single or multi-frame DICOM image from an input stream (such as from a file or the network).
i
- the input streamjava.io.IOException
DicomException
public SourceImage(AttributeList list) throws DicomException
Construct an image from a single or multi-frame DICOM image from a list of DICOM attributes.
list
- the list of attributes that include the description and values of the pixel dataDicomException
protected static void clean(java.lang.Object object) throws java.lang.Exception
java.lang.Exception
public void close() throws java.lang.Throwable
java.lang.Throwable
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected java.nio.ByteBuffer getByteBufferFromOtherAttributeOnDisk(OtherAttributeOnDisk oad) throws DicomException, java.io.IOException
Get a memory mapped file buffer for value of the specified attribute.
oad
- the attribute on disk to memory mapDicomException
java.io.IOException
protected java.nio.ShortBuffer getShortBufferFromOtherWordAttributeOnDisk(OtherWordAttributeOnDisk oad) throws DicomException, java.io.IOException
Get a memory mapped file buffer for value of the specified attribute.
oad
- the attribute on disk to memory mapDicomException
java.io.IOException
public java.awt.image.BufferedImage getBufferedImage()
public java.awt.image.BufferedImage getBufferedImage(int i)
public int getNumberOfBufferedImages()
public int getWidth()
public int getHeight()
public java.awt.Dimension getDimension()
public double getMinimum()
public double getMaximum()
public int getMaskValue()
public boolean isSigned()
public boolean isInverted()
public boolean isPadded()
public int getPadValue()
public int getPadRangeLimit()
public int getBackgroundValue()
public boolean isGrayscale()
public boolean isYBR()
public java.lang.String getTitle()
public int getNumberOfFrames()
public int getPaletteColorLargestGray()
public int getPaletteColorFirstValueMapped()
public int getPaletteColorNumberOfEntries()
public int getPaletteColorBitsPerEntry()
public short[] getPaletteColorRedTable()
public short[] getPaletteColorGreenTable()
public short[] getPaletteColorBlueTable()
public SUVTransform getSUVTransform()
public RealWorldValueTransform getRealWorldValueTransform()
public ModalityTransform getModalityTransform()
public VOITransform getVOITransform()
public DisplayShutter getDisplayShutter()
public Overlay getOverlay()