public class DicomFileUtilities extends Object
Various static methods helpful for handling DICOM files.
Modifier and Type | Method and Description |
---|---|
static boolean |
isDicomOrAcrNemaFile(File file)
Does the file contain a DICOM (or DICOM-like ACR-NEMA) dataset ?
|
static boolean |
isDicomOrAcrNemaFile(String filename)
Does the file contain a DICOM (or DICOM-like ACR-NEMA) dataset ?
|
static void |
main(String[] arg)
Iterate through a list of files and report which are DICOM and which are not.
|
public static boolean isDicomOrAcrNemaFile(File file)
Does the file contain a DICOM (or DICOM-like ACR-NEMA) dataset ?
Any exceptions during attempts to read are (silently) caught and false returned.
Note that this method may return true but DicomInputStream
and AttributeList
may fail
to read the file, since it may be "bad" ways that are not supported, e.g., missing TransferSyntaxUID in meta information header, etc.
Will detect files with:
Will reject everything else, including files with:
file
- the filepublic static boolean isDicomOrAcrNemaFile(String filename)
Does the file contain a DICOM (or DICOM-like ACR-NEMA) dataset ?
Any exceptions during attempts to read are caught and false returned.
filename
- the filepublic static void main(String[] arg)
Iterate through a list of files and report which are DICOM and which are not.
arg
- a list of files to test