public class DicomInstanceValidator
extends java.lang.Object
The DicomInstanceValidator
class is
for validating composite storage SOP instances against the standard IOD for the corresponding storage SOP Class.
Typically used by reading the list of attributes that comprise an object, validating them
and displaying the resulting string results to the user on the standard output, in a dialog
box or whatever. The basic implementation of the main
method (that may be useful as a
command line utility in its own right) is as follows:
AttributeList list = new AttributeList(); list.read(arg[0],null,true,true); DicomInstanceValidator validator = new DicomInstanceValidator(); System.err.print(validator.validate(list));
AttributeList
Constructor and Description |
---|
DicomInstanceValidator()
Create an instance of validator.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] arg)
Read the DICOM file specified on the command line and validate it against the standard IOD for the appropriate storage SOP Class.
|
java.lang.String |
validate(AttributeList list)
Validate a DICOM composite storage instance against the standard IOD for the appropriate storage SOP Class.
|
public DicomInstanceValidator() throws javax.xml.transform.TransformerConfigurationException
Create an instance of validator.
Once created, a validator may be reused for as many validations as desired.
javax.xml.transform.TransformerConfigurationException
public static void main(java.lang.String[] arg)
Read the DICOM file specified on the command line and validate it against the standard IOD for the appropriate storage SOP Class.
The result of the validation is printed to the standard output.
arg
- the name of the file containing the DICOM composite storage instance to be validatedpublic java.lang.String validate(AttributeList list) throws javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException, java.io.UnsupportedEncodingException
Validate a DICOM composite storage instance against the standard IOD for the appropriate storage SOP Class.
list
- the list of attributes comprising the DICOM composite storage instance to be validatedjavax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerException
java.io.UnsupportedEncodingException