org.dcm4che.data
Interface Dataset

All Superinterfaces:
DcmObject, java.io.Serializable

public interface Dataset
extends DcmObject, java.io.Serializable

Defines behavior of Dataset container objects.

Since:
March, 2002
Version:
$Revision: 4028 $ $Date: 2006-07-10 18:39:15 +0200 (Mo, 10 Jul 2006) $

Author:
gunter zeilinger, joseph foraci
See Also:
"DICOM Part 5: Data Structures and Encoding, 7. The Data Set"

Field Summary
 
Fields inherited from interface org.dcm4che.data.DcmObject
ADD_ITEMS, MERGE_ITEMS, REPLACE_ITEMS
 
Method Summary
 int calcLength(DcmEncodeParam param)
           
 void dumpDataset(java.io.OutputStream out, java.util.Map map)
           
 void dumpDataset(java.io.OutputStream out, java.util.Map map, int excludeValueLengthLimit)
           
 void dumpDataset(java.io.Writer w, java.util.Map map)
           
 void dumpDataset(java.io.Writer w, java.util.Map map, int excludeValueLengthLimit)
           
 Dataset exclude(int[] tags)
           
 Dataset exclude(int[] tags, int[] vrs)
           
 Dataset excludePrivate()
           
 FileMetaInfo getFileMetaInfo()
           
 long getItemOffset()
           
 Dataset getParent()
           
 boolean match(Dataset keys, boolean ignorePNCase, boolean ignoreEmpty)
           
 void putBufferedImage(java.awt.image.BufferedImage bi)
          Place the attributes to represent the given BufferedImage into this dataset.
 void putBufferedImage(java.awt.image.BufferedImage bi, java.awt.Rectangle sourceRegion)
           
 void putBufferedImage(java.awt.image.BufferedImage bi, java.awt.Rectangle sourceRegion, boolean writeIndexedAsPaletteColor)
           
 void putBufferedImageAsMonochrome(java.awt.image.BufferedImage bi, java.awt.Rectangle sourceRegion, boolean writeAsMonochrome2)
           
 void putBufferedImageAsPaletteColor(java.awt.image.BufferedImage bi, java.awt.Rectangle sourceRegion)
           
 void putBufferedImageAsRgb(java.awt.image.BufferedImage bi, java.awt.Rectangle sourceRegion)
           
 void readDataset(java.io.InputStream in, DcmDecodeParam param, int stopTag)
           
 void readFile(java.io.File file, FileFormat format, int stopTag)
           
 void readFile(javax.imageio.stream.ImageInputStream iin, FileFormat format, int stopTag)
           
 void readFile(java.io.InputStream in, FileFormat format, int stopTag)
           
 Dataset setFileMetaInfo(FileMetaInfo fmi)
           
 Dataset setItemOffset(long itemOffset)
           
 void shareElements()
           
 Dataset subSet(Dataset filter)
           
 Dataset subSet(int[] tags)
           
 Dataset subSet(int[] tags, boolean exclude, boolean excludePrivate)
           
 Dataset subSet(int[] tags, int[] vrs)
           
 Dataset subSet(int[] tags, int[] vrs, boolean exclude, boolean excludePrivate)
           
 Dataset subSet(int fromTag, int toTag)
           
 java.awt.image.BufferedImage toBufferedImage()
          Constructs a BufferedImage representing this datasets image.
 java.awt.image.BufferedImage toBufferedImage(int frame)
          Constructs a BufferedImage of the given frame number of this dataset
 void writeDataset(org.xml.sax.ContentHandler handler, TagDictionary dict)
           
 void writeDataset(DcmHandler handler, DcmEncodeParam param)
           
 void writeDataset(javax.imageio.stream.ImageOutputStream out, DcmEncodeParam param)
           
 void writeDataset(java.io.OutputStream out, DcmEncodeParam param)
           
 void writeDataset2(org.xml.sax.ContentHandler ch, TagDictionary dict, int[] excludeTags, int excludeValueLengthLimit, java.io.File basedir)
           
 void writeFile(org.xml.sax.ContentHandler handler, TagDictionary dict)
           
 void writeFile(java.io.File file, DcmEncodeParam param)
           
 void writeFile(javax.imageio.stream.ImageOutputStream iout, DcmEncodeParam param)
           
 void writeFile(java.io.OutputStream out, DcmEncodeParam param)
           
 void writeFile2(org.xml.sax.ContentHandler ch, TagDictionary dict, int[] excludeTags, int excludeValueLengthLimit, java.io.File basedir)
           
 
Methods inherited from interface org.dcm4che.data.DcmObject
clear, contains, containsValue, get, getBoundedString, getBoundedString, getBoundedString, getBoundedString, getBoundedStrings, getByteBuffer, getDate, getDate, getDateRange, getDates, getDateTime, getDateTimeRange, getDcmHandler, getDouble, getDouble, getDouble, getDouble, getDoubles, getFloat, getFloat, getFloat, getFloat, getFloats, getInt, getInt, getInteger, getInteger, getInts, getItem, getItem, getPersonName, getPersonName, getPersonNames, getPrivateCreatorID, getSAXHandler, getSAXHandler2, getSpecificCharacterSet, getString, getString, getString, getString, getStrings, getTag, getTag, getTags, isEmpty, iterator, length, putAE, putAE, putAE, putAll, putAll, putAS, putAS, putAS, putAT, putAT, putAT, putAT, putAT, putCS, putCS, putCS, putDA, putDA, putDA, putDA, putDA, putDA, putDS, putDS, putDS, putDS, putDS, putDT, putDT, putDT, putDT, putDT, putDT, putFD, putFD, putFD, putFD, putFD, putFL, putFL, putFL, putFL, putFL, putIS, putIS, putIS, putIS, putIS, putLO, putLO, putLO, putLT, putLT, putLT, putOB, putOB, putOB, putOBsq, putOF, putOF, putOF, putOFsq, putOW, putOW, putOW, putOWsq, putPN, putPN, putPN, putPN, putPN, putSH, putSH, putSH, putSL, putSL, putSL, putSL, putSL, putSQ, putSS, putSS, putSS, putSS, putSS, putST, putST, putST, putTM, putTM, putTM, putTM, putTM, putTM, putUI, putUI, putUI, putUL, putUL, putUL, putUL, putUL, putUN, putUN, putUNsq, putUS, putUS, putUS, putUS, putUS, putUT, putUT, putUT, putXX, putXX, putXX, putXX, putXX, putXX, putXX, putXX, putXXsq, putXXsq, remove, setPrivateCreatorID, size, vm, writeHeader, writeHeader
 

Method Detail

shareElements

void shareElements()

setFileMetaInfo

Dataset setFileMetaInfo(FileMetaInfo fmi)

getFileMetaInfo

FileMetaInfo getFileMetaInfo()

getParent

Dataset getParent()

setItemOffset

Dataset setItemOffset(long itemOffset)

getItemOffset

long getItemOffset()

calcLength

int calcLength(DcmEncodeParam param)

writeDataset

void writeDataset(DcmHandler handler,
                  DcmEncodeParam param)
                  throws java.io.IOException
Throws:
java.io.IOException

writeDataset

void writeDataset(java.io.OutputStream out,
                  DcmEncodeParam param)
                  throws java.io.IOException
Throws:
java.io.IOException

writeDataset

void writeDataset(javax.imageio.stream.ImageOutputStream out,
                  DcmEncodeParam param)
                  throws java.io.IOException
Throws:
java.io.IOException

readDataset

void readDataset(java.io.InputStream in,
                 DcmDecodeParam param,
                 int stopTag)
                 throws java.io.IOException
Throws:
java.io.IOException

readFile

void readFile(java.io.InputStream in,
              FileFormat format,
              int stopTag)
              throws java.io.IOException
Throws:
java.io.IOException

readFile

void readFile(javax.imageio.stream.ImageInputStream iin,
              FileFormat format,
              int stopTag)
              throws java.io.IOException
Throws:
java.io.IOException

readFile

void readFile(java.io.File file,
              FileFormat format,
              int stopTag)
              throws java.io.IOException
Throws:
java.io.IOException

writeFile

void writeFile(java.io.OutputStream out,
               DcmEncodeParam param)
               throws java.io.IOException
Throws:
java.io.IOException

writeFile

void writeFile(javax.imageio.stream.ImageOutputStream iout,
               DcmEncodeParam param)
               throws java.io.IOException
Throws:
java.io.IOException

writeFile

void writeFile(java.io.File file,
               DcmEncodeParam param)
               throws java.io.IOException
Throws:
java.io.IOException

writeFile

void writeFile(org.xml.sax.ContentHandler handler,
               TagDictionary dict)
               throws java.io.IOException
Throws:
java.io.IOException

writeFile2

void writeFile2(org.xml.sax.ContentHandler ch,
                TagDictionary dict,
                int[] excludeTags,
                int excludeValueLengthLimit,
                java.io.File basedir)
                throws java.io.IOException
Throws:
java.io.IOException

writeDataset

void writeDataset(org.xml.sax.ContentHandler handler,
                  TagDictionary dict)
                  throws java.io.IOException
Throws:
java.io.IOException

writeDataset2

void writeDataset2(org.xml.sax.ContentHandler ch,
                   TagDictionary dict,
                   int[] excludeTags,
                   int excludeValueLengthLimit,
                   java.io.File basedir)
                   throws java.io.IOException
Throws:
java.io.IOException

subSet

Dataset subSet(int fromTag,
               int toTag)

subSet

Dataset subSet(Dataset filter)

subSet

Dataset subSet(int[] tags)

subSet

Dataset subSet(int[] tags,
               boolean exclude,
               boolean excludePrivate)

exclude

Dataset exclude(int[] tags)

subSet

Dataset subSet(int[] tags,
               int[] vrs)

subSet

Dataset subSet(int[] tags,
               int[] vrs,
               boolean exclude,
               boolean excludePrivate)

exclude

Dataset exclude(int[] tags,
                int[] vrs)

excludePrivate

Dataset excludePrivate()

match

boolean match(Dataset keys,
              boolean ignorePNCase,
              boolean ignoreEmpty)

dumpDataset

void dumpDataset(java.io.OutputStream out,
                 java.util.Map map,
                 int excludeValueLengthLimit)
                 throws java.io.IOException
Throws:
java.io.IOException

dumpDataset

void dumpDataset(java.io.OutputStream out,
                 java.util.Map map)
                 throws java.io.IOException
Throws:
java.io.IOException

dumpDataset

void dumpDataset(java.io.Writer w,
                 java.util.Map map,
                 int excludeValueLengthLimit)
                 throws java.io.IOException
Throws:
java.io.IOException

dumpDataset

void dumpDataset(java.io.Writer w,
                 java.util.Map map)
                 throws java.io.IOException
Throws:
java.io.IOException

toBufferedImage

java.awt.image.BufferedImage toBufferedImage()
Constructs a BufferedImage representing this datasets image. The first image, if multiframe.

Returns:
A BufferedImage representing the encoded DICOM image.
Throws:
java.lang.IllegalStateException - If this dataset contains invalid or unsupported Image Pixel Module attributes describing the encoding of DICOM image pixel data

toBufferedImage

java.awt.image.BufferedImage toBufferedImage(int frame)
Constructs a BufferedImage of the given frame number of this dataset

Parameters:
frame - The frame number to convert to a BufferedImage
Returns:
A BufferedImage representing the encoded DICOM image.
Throws:
java.lang.IllegalStateException - If this dataset contains invalid or unsupported Image Pixel Module attributes describing the encoding of DICOM image pixel data
java.lang.IllegalArgumentException - If frame does not appear to exist

putBufferedImage

void putBufferedImage(java.awt.image.BufferedImage bi)
Place the attributes to represent the given BufferedImage into this dataset. The most appropriate Image Pixel Module attributes to represent the BufferedImage are placed in the dataset as well as the actual image data and any other related attributes (palette LUTs, etc). No other attributes are set.

Parameters:
bi - A BufferedImage

putBufferedImage

void putBufferedImage(java.awt.image.BufferedImage bi,
                      java.awt.Rectangle sourceRegion)

putBufferedImage

void putBufferedImage(java.awt.image.BufferedImage bi,
                      java.awt.Rectangle sourceRegion,
                      boolean writeIndexedAsPaletteColor)

putBufferedImageAsRgb

void putBufferedImageAsRgb(java.awt.image.BufferedImage bi,
                           java.awt.Rectangle sourceRegion)

putBufferedImageAsMonochrome

void putBufferedImageAsMonochrome(java.awt.image.BufferedImage bi,
                                  java.awt.Rectangle sourceRegion,
                                  boolean writeAsMonochrome2)

putBufferedImageAsPaletteColor

void putBufferedImageAsPaletteColor(java.awt.image.BufferedImage bi,
                                    java.awt.Rectangle sourceRegion)