Class DeidentifyAndRedact.RedactionRegions

  • Enclosing class:
    DeidentifyAndRedact

    protected class DeidentifyAndRedact.RedactionRegions
    extends java.lang.Object

    A protected class to store sets of rectangular redaction regions indexed by a String classname.

    • Constructor Summary

      Constructors 
      Constructor Description
      RedactionRegions​(java.lang.String fileName)
      Construct the redaction regions from a text file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Vector<java.awt.Shape> getRedactionRegionShapes​(java.lang.String className)
      Find the redaction regions for the specified class name.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RedactionRegions

        public RedactionRegions​(java.lang.String fileName)
                         throws java.lang.Exception

        Construct the redaction regions from a text file.

        The format for each line is "class=(x,y,w,h)[;(x,y,w,h)]*", e.g., where class = "columnsxrows". E.g., "800x600 = (0,0,639,150)" (without the quotes)

        Parameters:
        fileName -
        Throws:
        java.lang.Exception
    • Method Detail

      • getRedactionRegionShapes

        public java.util.Vector<java.awt.Shape> getRedactionRegionShapes​(java.lang.String className)

        Find the redaction regions for the specified class name.

        Parameters:
        className - a String of the form "colsxrows" to match the Rows and Columns values of the image
        Returns:
        the Vector of Shape for the requested class name, or null if not found