Class BitwiseOR


  • public class BitwiseOR
    extends java.lang.Object
    Implementation of bitwise OR operator, given two buffered images of equal size, it'll compute bitwise OR for each pixel ( in each pixel for each color component ), and produces output buffered image, without anyhow modifying original images
    • Constructor Summary

      Constructors 
      Constructor Description
      BitwiseOR()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.awt.Color[] extractRow​(int row, java.awt.image.BufferedImage img)
      Given a buffered image & row index, it'll extract out all pixel intensities present along that row
      protected boolean isEligible​(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo)
      Operand images on which we'll apply any bitwise operation needs to be of same dimension, which is what's ensured here
      java.awt.image.BufferedImage operate​(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo)
      Sequentially extracts each row of operand images, and concurrently processes each of them, on different thread of workers.
      java.awt.image.BufferedImage operate​(java.lang.String operandOne, java.lang.String operandTwo)  
      • Methods inherited from class java.lang.Object

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

      • BitwiseOR

        public BitwiseOR()
    • Method Detail

      • operate

        public java.awt.image.BufferedImage operate​(java.awt.image.BufferedImage operandOne,
                                                    java.awt.image.BufferedImage operandTwo)
        Sequentially extracts each row of operand images, and concurrently processes each of them, on different thread of workers. Each worker applies bitwise OR operator on pixel intensity values
      • operate

        public java.awt.image.BufferedImage operate​(java.lang.String operandOne,
                                                    java.lang.String operandTwo)
      • extractRow

        protected java.awt.Color[] extractRow​(int row,
                                              java.awt.image.BufferedImage img)
        Given a buffered image & row index, it'll extract out all pixel intensities present along that row
      • isEligible

        protected boolean isEligible​(java.awt.image.BufferedImage operandOne,
                                     java.awt.image.BufferedImage operandTwo)
        Operand images on which we'll apply any bitwise operation needs to be of same dimension, which is what's ensured here