public class DicomDataset extends ImageDataset
Constructor and Description |
---|
DicomDataset(java.io.File dataSource)
Creates a new DicomDataset from the specified file
|
DicomDataset(java.lang.String dataFileName)
Creates a new DicomDataset from the specified file
|
Modifier and Type | Method and Description |
---|---|
int |
getNumFrames()
Returns the number of frames in the file.
|
double[] |
read(int idx)
Reads a specified frame from the DICOM file
|
getBigFileSize, getCurrentFrame, getData, getPixelData, read, rewind, setBigFileSize
public DicomDataset(java.lang.String dataFileName) throws java.io.IOException, com.pixelmed.dicom.DicomException
dataFileName
- DICOM file to readjava.io.IOException
- if an I/O error occurscom.pixelmed.dicom.DicomException
- if the file doesn't appear to be valid DICOM/DICONDE, etc.public DicomDataset(java.io.File dataSource) throws java.io.IOException, com.pixelmed.dicom.DicomException
dataSource
- DICOM file to readjava.io.IOException
- if an I/O error occurscom.pixelmed.dicom.DicomException
- if the file doesn't appear to be valid DICOM/DICONDEpublic double[] read(int idx) throws java.io.IOException
read
in class ImageDataset
idx
- index to readjava.io.IOException
- if an I/O error occursjava.lang.IndexOutOfBoundsException
- if idx < 0 || idx > number of frames in the filepublic int getNumFrames()
getNumFrames
in class ImageDataset