Package com.pixelmed.apps

## Class DeidentifyAndRedactWithOriginalFileName

- java.lang.Object
- - com.pixelmed.apps.DeidentifyAndRedact
  - - com.pixelmed.apps.DeidentifyAndRedactWithOriginalFileName

-     public class DeidentifyAndRedactWithOriginalFileName
      extends DeidentifyAndRedact

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.pixelmed.apps.DeidentifyAndRedact

      `DeidentifyAndRedact.OurMediaImporter, DeidentifyAndRedact.RedactionRegions`

  - ### Field Summary

    - ### Fields inherited from class com.pixelmed.apps.DeidentifyAndRedact

      `failedSet, ourCalledAETitle`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName, java.lang.String outputFolderName, java.lang.String redactionControlFileName, boolean decompress, boolean keepAllPrivate)` |
    `DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName, java.lang.String outputFolderName, java.lang.String redactionControlFileName, boolean decompress, boolean keepAllPrivate, boolean addContributingEquipmentSequence)` |
    `DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName, java.lang.String outputFolderName, java.lang.String redactionControlFileName, boolean decompress, boolean keepAllPrivate, boolean addContributingEquipmentSequence, AttributeList replacementAttributes)` |
    `DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName, java.lang.String outputFolderName, java.lang.String redactionControlFileName, boolean decompress, boolean keepAllPrivate, AttributeList replacementAttributes)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `main​(java.lang.String[] arg)` |
    `protected java.lang.String` | `makeOutputFileName​(java.lang.String outputFolderName, java.lang.String inputFileName, java.lang.String sopInstanceUID)` | Make a suitable file name to use for a deidentified and redacted input file.

    - ### Methods inherited from class com.pixelmed.apps.DeidentifyAndRedact

      `getFilePathNamesThatFailedToProcess`

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

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

- - ### Constructor Detail

    - #### DeidentifyAndRedactWithOriginalFileName

          public DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName,
                                                         java.lang.String outputFolderName,
                                                         java.lang.String redactionControlFileName,
                                                         boolean decompress,
                                                         boolean keepAllPrivate,
                                                         boolean addContributingEquipmentSequence,
                                                         AttributeList replacementAttributes)
                                                  throws DicomException,
                                                         java.lang.Exception,
                                                         java.io.IOException

      Throws:
        `DicomException`
        `java.lang.Exception`
        `java.io.IOException`

    - #### DeidentifyAndRedactWithOriginalFileName

          public DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName,
                                                         java.lang.String outputFolderName,
                                                         java.lang.String redactionControlFileName,
                                                         boolean decompress,
                                                         boolean keepAllPrivate,
                                                         AttributeList replacementAttributes)
                                                  throws DicomException,
                                                         java.lang.Exception,
                                                         java.io.IOException

      Throws:
        `DicomException`
        `java.lang.Exception`
        `java.io.IOException`

    - #### DeidentifyAndRedactWithOriginalFileName

          public DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName,
                                                         java.lang.String outputFolderName,
                                                         java.lang.String redactionControlFileName,
                                                         boolean decompress,
                                                         boolean keepAllPrivate,
                                                         boolean addContributingEquipmentSequence)
                                                  throws DicomException,
                                                         java.lang.Exception,
                                                         java.io.IOException

      Throws:
        `DicomException`
        `java.lang.Exception`
        `java.io.IOException`

    - #### DeidentifyAndRedactWithOriginalFileName

          public DeidentifyAndRedactWithOriginalFileName​(java.lang.String inputPathName,
                                                         java.lang.String outputFolderName,
                                                         java.lang.String redactionControlFileName,
                                                         boolean decompress,
                                                         boolean keepAllPrivate)
                                                  throws DicomException,
                                                         java.lang.Exception,
                                                         java.io.IOException

      Throws:
        `DicomException`
        `java.lang.Exception`
        `java.io.IOException`

  - ### Method Detail

    - #### makeOutputFileName

          protected java.lang.String makeOutputFileName​(java.lang.String outputFolderName,
                                                        java.lang.String inputFileName,
                                                        java.lang.String sopInstanceUID)
                                                 throws java.io.IOException

      Make a suitable file name to use for a deidentified and redacted input file.

      Uses the inputFileName without any trailing ".dcm" suffix plus "_Anon.dcm" in the outputFolderName (ignoring the sopInstanceUID).

      Does NOT use the full hierarchy of the inputFileName, only the base file name and does NOT check whether or not the generated file name already exists, so may cause any existing or duplicate base file name to be silently overwritten.

      Overrides the default method in the parent class.

      Overrides:
        `makeOutputFileName` in class `DeidentifyAndRedact`
      Parameters:
        `outputFolderName` - where to store all the processed output files
        `inputFileName` - the path to search for DICOM files
        `sopInstanceUID` - the SOP Instance UID of the output file
      Throws:
        `java.io.IOException` - if a filename cannot be constructed

    - #### main

          public static void main​(java.lang.String[] arg)