public Object getProperty(String name,
                              Object opNode) {
        validate(name, opNode);

        if(opNode instanceof RenderedOp &&
           name.equalsIgnoreCase("roi")) {
            RenderedOp op = (RenderedOp)opNode;

	    ParameterBlock pb = op.getParameterBlock();

	    // Retrieve the rendered source image and its ROI.
	    RenderedImage src = pb.getRenderedSource(0);
	    Object property = src.getProperty("ROI");
	    if (property == null ||
		property.equals(java.awt.Image.UndefinedProperty) ||
		!(property instanceof ROI)) {
		return null;
	    }
	    ROI srcROI = (ROI)property;

	    // Determine the effective source bounds.
	    Rectangle srcBounds = null;
	    PlanarImage dst = op.getRendering();
	    if(dst instanceof WarpOpImage && !((OpImage)dst).hasExtender(0)) {
		WarpOpImage warpIm = (WarpOpImage)dst;
		srcBounds =
		    new Rectangle(src.getMinX() + warpIm.getLeftPadding(),
				  src.getMinY() + warpIm.getTopPadding(),
				  src.getWidth() - warpIm.getWidth() + 1,
				  src.getHeight() - warpIm.getHeight() + 1);
	    } else {
		srcBounds = new Rectangle(src.getMinX(),
					  src.getMinY(),
					  src.getWidth(),
					  src.getHeight());
	    }

	    // If necessary, clip the ROI to the effective source bounds.
	    if(!srcBounds.contains(srcROI.getBounds())) {
		srcROI = srcROI.intersect(new ROIShape(srcBounds));
	    }

	    // Retrieve the scale factors
	    float sx = 1.0F/pb.getIntParameter(1);
	    float sy = 1.0F/pb.getIntParameter(2);

	    // Create an equivalent transform.
	    AffineTransform transform =
		new AffineTransform(sx, 0.0, 0.0, sy, 0, 0);

	    // Create the scaled ROI.
	    ROI dstROI = srcROI.transform(transform);

	    // Retrieve the destination bounds.
	    Rectangle dstBounds = op.getBounds();

	    // If necessary, clip the warped ROI to the destination bounds.
	    if(!dstBounds.contains(dstROI.getBounds())) {
		dstROI = dstROI.intersect(new ROIShape(dstBounds));
	    }

	    // Return the warped and possibly clipped ROI.
	    return dstROI;
	} else {
	    return null;
	}
    }