package pl.wroc.pwr.imagechannel.basic; import pl.wroc.pwr.IOperator; import pl.wroc.pwr.image.IImage; import pl.wroc.pwr.imagechannel.IImageChannel; public class DecomposeImage implements IOperator< IImageChannel > { private IImage inputImage; private int channel; public DecomposeImage( IImage image, int channel ) { this.inputImage = image; this.channel = channel; } public void setImage( IImage inputImage ) { this.inputImage = inputImage; } public void setChannel( int channel ) { this.channel = channel; } public IImageChannel apply( ) { IImageChannel outputChannel = this.inputImage.getChannel( this.channel ); return outputChannel; } }