Package com.pixelmed.apps

# Class FindAndCopySelectedDicomFiles

java.lang.Object
com.pixelmed.dicom.MediaImporter
com.pixelmed.apps.FindAndCopySelectedDicomFiles

public class FindAndCopySelectedDicomFiles extends MediaImporter

This class copies a set of DICOM files, if they match specified criteria.

## Nested Class Summary

## Nested classes/interfaces inherited from class com.pixelmed.dicom.MediaImporter

`MediaImporter.MediaImporterWithFileChooserDialogThread, MediaImporter.OurReadTerminationStrategy`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`exact`
`protected String`
`outputPath`
`protected Set<String>`
`sopClasses`

### Fields inherited from class com.pixelmed.dicom.MediaImporter

`logger, mediaDirectoryPath, progressBar, progressBarUpdater, terminateAfterIdentifyingGroup`

## Constructor Summary

Constructors
Constructor
Description
`FindAndCopySelectedDicomFiles(MessageLogger logger)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doSomethingWithDicomFileOnMedia(String mediaFileName)`
Do something with the referenced DICOM file that has been encountered.
`protected boolean`
`isOKToImport(String sopClassUID, String transferSyntaxUID)`
Check for valid information, and that the file is not compressed or not a suitable storage object for import.
`static void`
`main(String[] arg)`
Copy a set of DICOM files, if they match specified criteria.

### Methods inherited from class com.pixelmed.dicom.MediaImporter

`choosePathAndImportDicomFiles, choosePathAndImportDicomFiles, doSomethingWithDicomFileOnMedia, doSomethingWithUnwantedFileOnMedia, getDirectory, importDicomFiles, logLn`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### exact

protected boolean exact

### sopClasses

protected Set<String> sopClasses

### outputPath

protected String outputPath

## Constructor Details

### FindAndCopySelectedDicomFiles

public FindAndCopySelectedDicomFiles(MessageLogger logger)

## Method Details

### isOKToImport

protected boolean isOKToImport(String sopClassUID, String transferSyntaxUID)

Check for valid information, and that the file is not compressed or not a suitable storage object for import.

Overrides:
  `isOKToImport` in class `MediaImporter`
Parameters:
  `sopClassUID` -
  `transferSyntaxUID` -
Returns:
  true if is suitable

### doSomethingWithDicomFileOnMedia

protected void doSomethingWithDicomFileOnMedia(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.

Overrides:
  `doSomethingWithDicomFileOnMedia` in class `MediaImporter`
Parameters:
  `mediaFileName` - the fully qualified path name to a DICOM file

### main

public static void main(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)`.

Parameters:
  `arg` - array of four strings - the input path, the output path, and the SOP Class UID or Modality