public class FindAndCopySelectedDicomFiles extends MediaImporter
This class copies a set of DICOM files, if they match specified criteria.
MediaImporter.MediaImporterWithFileChooserDialogThread, MediaImporter.OurReadTerminationStrategy
Modifier and Type | Field and Description |
---|---|
protected boolean |
exact |
protected java.lang.String |
outputPath |
protected java.util.Set<java.lang.String> |
sopClasses |
logger, mediaDirectoryPath, progressBar, progressBarUpdater, terminateAfterIdentifyingGroup
Constructor and Description |
---|
FindAndCopySelectedDicomFiles(MessageLogger logger) |
Modifier and Type | Method and Description |
---|---|
protected void |
doSomethingWithDicomFileOnMedia(java.lang.String mediaFileName)
Do something with the referenced DICOM file that has been encountered.
|
protected boolean |
isOKToImport(java.lang.String sopClassUID,
java.lang.String transferSyntaxUID)
Check for valid information, and that the file is not compressed or not a suitable storage object for import.
|
static void |
main(java.lang.String[] arg)
Copy a set of DICOM files, if they match specified criteria.
|
choosePathAndImportDicomFiles, choosePathAndImportDicomFiles, doSomethingWithDicomFileOnMedia, doSomethingWithUnwantedFileOnMedia, getDirectory, importDicomFiles, logLn
protected boolean exact
protected java.lang.String outputPath
protected java.util.Set<java.lang.String> sopClasses
public FindAndCopySelectedDicomFiles(MessageLogger logger)
protected void doSomethingWithDicomFileOnMedia(java.lang.String mediaFileName)
Do something with the referenced DICOM file that has been encountered.
This method needs to be implemented in a sub-class to do anything useful. The default method does nothing.
This method does not define any exceptions and hence must handle any errors locally.
doSomethingWithDicomFileOnMedia
in class MediaImporter
mediaFileName
- the fully qualified path name to a DICOM fileprotected boolean isOKToImport(java.lang.String sopClassUID, java.lang.String transferSyntaxUID)
Check for valid information, and that the file is not compressed or not a suitable storage object for import.
isOKToImport
in class MediaImporter
sopClassUID
- transferSyntaxUID
- public static void main(java.lang.String[] arg)
Copy a set of DICOM files, if they match specified criteria.
Does not actually check the Modality value in the file, but matches the SOP Class against what is returned from SOPClass.getPlausibleStandardSOPClassUIDsForModality(String)
.
arg
- array of four strings - the input path, the output path, and the SOP Class UID or Modality