Package com.pixelmed.convert
Class ConvertAmicasJPEG2000FilesetToDicom
java.lang.Object
com.pixelmed.convert.ConvertAmicasJPEG2000FilesetToDicom
This class provides conversion of a set of Amicas JPEG 2000 files to DICOM.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classInstances of this class select only Files that are directories.final classInstances of this class select only File names that end with the specified suffix. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected PrintWriterprotected SpecificCharacterSetprotected static UIDGenerator -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an converter that will looked for files in the system default path.ConvertAmicasJPEG2000FilesetToDicom(String mediaDirectoryPath) Construct an converter that will looked for files in the specified path. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDicomAttributeFromXmlAttribute(AttributeList list, AttributeTag tag, String xmlAttributeName, NamedNodeMap xmlAttributes, int type, String defaultValueForType1) voidPop up folder chooser dialogs that allow the user to specify the location of the amicas-patients folder, or the parent folder (for example, the drive or volume) in which the amicas-patients folder is located, and the output folder to store the converted DICOM files, and then perform the conversion.voidconvertAmicasFiles(String pathName, String dicomOutputFolder) Read an amicas-patients folder, and then convert any image files within.protected voidcreateDicomImageFileFromAmicasImageFile(File amicasFolder, String amicasFileName, String dicomOutputFolder, String storingAETitle, AttributeList patientList, AttributeList studyList, AttributeList seriesList, AttributeList imageList) protected StringgetNamedAttributeValue(NamedNodeMap xmlAttributes, String xmlAttributeName) static voidConvert a set of Amicas JPEG 2000 files to DICOM.protected AttributeListmakeAttributeListForImage(NamedNodeMap xmlAttributes) protected AttributeListmakeAttributeListForPatient(NamedNodeMap xmlAttributes) protected AttributeListmakeAttributeListForSeries(NamedNodeMap xmlAttributes) protected AttributeListmakeAttributeListForStudy(NamedNodeMap xmlAttributes) protected AttributemakeDicomAttributeFromXmlAttribute(AttributeTag tag, String xmlAttributeName, NamedNodeMap xmlAttributes, int type, String defaultValue) protected AttributenewAttribute(AttributeTag tag) voidsetLogger(OutputStream stream) voidsetLogger(PrintWriter pwlogger) voidprotected static SpecificCharacterSet
-
Field Details
-
mediaDirectoryPath
-
pwlogger
-
onlyDirectoriesFileFilter
-
onlyXMLFilenameFilter
-
specificCharacterSet
-
uidGenerator
-
-
Constructor Details
-
ConvertAmicasJPEG2000FilesetToDicom
public ConvertAmicasJPEG2000FilesetToDicom()Construct an converter that will looked for files in the system default path.
-
ConvertAmicasJPEG2000FilesetToDicom
Construct an converter that will looked for files in the specified path.
- Parameters:
mediaDirectoryPath- where to begin looking for the amicas-patients folder
-
-
Method Details
-
setLogger
-
setLogger
-
setLogger
-
choosePathsAndConvertAmicasFiles
public void choosePathsAndConvertAmicasFiles() throws IOException, DicomException, ParserConfigurationException, SAXExceptionPop up folder chooser dialogs that allow the user to specify the location of the amicas-patients folder, or the parent folder (for example, the drive or volume) in which the amicas-patients folder is located, and the output folder to store the converted DICOM files, and then perform the conversion.
-
newAttribute
- Throws:
DicomException
-
getNamedAttributeValue
-
makeDicomAttributeFromXmlAttribute
protected Attribute makeDicomAttributeFromXmlAttribute(AttributeTag tag, String xmlAttributeName, NamedNodeMap xmlAttributes, int type, String defaultValue) throws DicomException - Throws:
DicomException
-
addDicomAttributeFromXmlAttribute
protected void addDicomAttributeFromXmlAttribute(AttributeList list, AttributeTag tag, String xmlAttributeName, NamedNodeMap xmlAttributes, int type, String defaultValueForType1) throws DicomException - Throws:
DicomException
-
makeAttributeListForPatient
protected AttributeList makeAttributeListForPatient(NamedNodeMap xmlAttributes) throws DicomException - Throws:
DicomException
-
makeAttributeListForStudy
- Throws:
DicomException
-
makeAttributeListForSeries
protected AttributeList makeAttributeListForSeries(NamedNodeMap xmlAttributes) throws DicomException - Throws:
DicomException
-
makeAttributeListForImage
- Throws:
DicomException
-
setSpecificCharacterSetFromDocumentEncoding
protected static SpecificCharacterSet setSpecificCharacterSetFromDocumentEncoding(Document document) -
createDicomImageFileFromAmicasImageFile
protected void createDicomImageFileFromAmicasImageFile(File amicasFolder, String amicasFileName, String dicomOutputFolder, String storingAETitle, AttributeList patientList, AttributeList studyList, AttributeList seriesList, AttributeList imageList) throws IOException, DicomException - Throws:
IOExceptionDicomException
-
convertAmicasFiles
public void convertAmicasFiles(String pathName, String dicomOutputFolder) throws IOException, DicomException, ParserConfigurationException, SAXException Read an amicas-patients folder, and then convert any image files within.
- Parameters:
pathName- the path name to an amicas-patients folder or folder containing an amicas-patients folderdicomOutputFolder- the path name to where to write the DICOM files- Throws:
IOExceptionDicomExceptionParserConfigurationExceptionSAXException
-
main
Convert a set of Amicas JPEG 2000 files to DICOM.
- Parameters:
arg- array of two strings - the path to the media or folder containing the files to convert, and the path to the folder to stored the converted images, or else will pop up file chooser dialogs to select these and create a frame to show the progress.
-