Example #1
0
 @Override
 public boolean checkInput() {
   if (errorMessage.length() > 0) {
     return false;
   } else if (image == null) {
     errorMessage = "ImageCalculator: [Image<S> image1] is null.";
     return false;
   } else if (output == null) {
     errorMessage = "ImageCalculator: [Image<T> output] is null.";
     return false;
   } else if (converter == null) {
     errorMessage = "ImageCalculator: [Converter<S,T>] is null.";
     return false;
   } else if (!image.getContainer().compareStorageContainerDimensions(output.getContainer())) {
     errorMessage =
         "ImageCalculator: Images have different dimensions, not supported:"
             + " Image: "
             + Util.printCoordinates(image.getDimensions())
             + " Output: "
             + Util.printCoordinates(output.getDimensions());
     return false;
   } else return true;
 }
 @Override
 public String getPositionAsString() {
   return Util.printCoordinates(getPosition());
 }