|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.convert.ConvertAmicasJPEG2000FilesetToDicom
public class ConvertAmicasJPEG2000FilesetToDicom
This class provides conversion of a set of Amicas JPEG 2000 files to DICOM.
| Nested Class Summary | |
|---|---|
class |
ConvertAmicasJPEG2000FilesetToDicom.OnlyDirectoriesFileFilter
Instances of this class select only Files that are directories. |
class |
ConvertAmicasJPEG2000FilesetToDicom.OnlySuffixFilenameFilter
Instances of this class select only File names that end with the specified suffix. |
| Field Summary | |
|---|---|
protected static DicomDictionary |
dictionary
|
protected PrintWriter |
logger
|
protected String |
mediaDirectoryPath
|
protected ConvertAmicasJPEG2000FilesetToDicom.OnlyDirectoriesFileFilter |
onlyDirectoriesFileFilter
|
protected ConvertAmicasJPEG2000FilesetToDicom.OnlySuffixFilenameFilter |
onlyXMLFilenameFilter
|
protected SpecificCharacterSet |
specificCharacterSet
|
protected static UIDGenerator |
uidGenerator
|
| Constructor Summary | |
|---|---|
ConvertAmicasJPEG2000FilesetToDicom()
Construct 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 | |
|---|---|
protected void |
addDicomAttributeFromXmlAttribute(AttributeList list,
AttributeTag tag,
String xmlAttributeName,
NamedNodeMap xmlAttributes,
int type,
String defaultValueForType1)
|
void |
choosePathsAndConvertAmicasFiles()
Pop 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. |
void |
convertAmicasFiles(String pathName,
String dicomOutputFolder)
Read an amicas-patients folder, and then convert any image files within. |
protected void |
createDicomImageFileFromAmicasImageFile(File amicasFolder,
String amicasFileName,
String dicomOutputFolder,
String storingAETitle,
AttributeList patientList,
AttributeList studyList,
AttributeList seriesList,
AttributeList imageList)
|
protected String |
getNamedAttributeValue(NamedNodeMap xmlAttributes,
String xmlAttributeName)
|
static void |
main(String[] arg)
Convert a set of Amicas JPEG 2000 files to DICOM. |
protected AttributeList |
makeAttributeListForImage(NamedNodeMap xmlAttributes)
|
protected AttributeList |
makeAttributeListForPatient(NamedNodeMap xmlAttributes)
|
protected AttributeList |
makeAttributeListForSeries(NamedNodeMap xmlAttributes)
|
protected AttributeList |
makeAttributeListForStudy(NamedNodeMap xmlAttributes)
|
protected Attribute |
makeDicomAttributeFromXmlAttribute(AttributeTag tag,
String xmlAttributeName,
NamedNodeMap xmlAttributes,
int type,
String defaultValue)
|
protected Attribute |
newAttribute(AttributeTag tag)
|
void |
setLogger(JFrame content,
int width,
int height)
|
void |
setLogger(OutputStream stream)
|
void |
setLogger(PrintWriter logger)
|
protected static SpecificCharacterSet |
setSpecificCharacterSetFromDocumentEncoding(Document document)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String mediaDirectoryPath
protected PrintWriter logger
protected ConvertAmicasJPEG2000FilesetToDicom.OnlyDirectoriesFileFilter onlyDirectoriesFileFilter
protected ConvertAmicasJPEG2000FilesetToDicom.OnlySuffixFilenameFilter onlyXMLFilenameFilter
protected SpecificCharacterSet specificCharacterSet
protected static DicomDictionary dictionary
protected static UIDGenerator uidGenerator
| Constructor Detail |
|---|
public ConvertAmicasJPEG2000FilesetToDicom()
Construct an converter that will looked for files in the system default path.
public ConvertAmicasJPEG2000FilesetToDicom(String mediaDirectoryPath)
Construct an converter that will looked for files in the specified path.
mediaDirectoryPath - where to begin looking for the amicas-patients folder| Method Detail |
|---|
public void setLogger(PrintWriter logger)
public void setLogger(OutputStream stream)
public void setLogger(JFrame content,
int width,
int height)
public void choosePathsAndConvertAmicasFiles()
throws IOException,
DicomException,
ParserConfigurationException,
SAXException
Pop 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.
IOException
DicomException
ParserConfigurationException
SAXException
protected Attribute newAttribute(AttributeTag tag)
throws DicomException
DicomException
protected String getNamedAttributeValue(NamedNodeMap xmlAttributes,
String xmlAttributeName)
protected Attribute makeDicomAttributeFromXmlAttribute(AttributeTag tag,
String xmlAttributeName,
NamedNodeMap xmlAttributes,
int type,
String defaultValue)
throws DicomException
DicomException
protected void addDicomAttributeFromXmlAttribute(AttributeList list,
AttributeTag tag,
String xmlAttributeName,
NamedNodeMap xmlAttributes,
int type,
String defaultValueForType1)
throws DicomException
DicomException
protected AttributeList makeAttributeListForPatient(NamedNodeMap xmlAttributes)
throws DicomException
DicomException
protected AttributeList makeAttributeListForStudy(NamedNodeMap xmlAttributes)
throws DicomException
DicomException
protected AttributeList makeAttributeListForSeries(NamedNodeMap xmlAttributes)
throws DicomException
DicomException
protected AttributeList makeAttributeListForImage(NamedNodeMap xmlAttributes)
throws DicomException
DicomExceptionprotected static SpecificCharacterSet setSpecificCharacterSetFromDocumentEncoding(Document document)
protected void createDicomImageFileFromAmicasImageFile(File amicasFolder,
String amicasFileName,
String dicomOutputFolder,
String storingAETitle,
AttributeList patientList,
AttributeList studyList,
AttributeList seriesList,
AttributeList imageList)
throws IOException,
DicomException
IOException
DicomException
public void convertAmicasFiles(String pathName,
String dicomOutputFolder)
throws IOException,
DicomException,
ParserConfigurationException,
SAXException
Read an amicas-patients folder, and then convert any image files within.
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
IOException
DicomException
ParserConfigurationException
SAXExceptionpublic static void main(String[] arg)
Convert a set of Amicas JPEG 2000 files to DICOM.
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||