@Override public void visit(SelectedChannelType sct) { if (sct.getContrastEnhancement() != null) { sct.getContrastEnhancement().accept(this); } }
public void visit(SelectedChannelType sct) { final SelectedChannelType copy = sf.createSelectedChannelType( sct.getChannelName(), copy(sct.getContrastEnhancement())); if (STRICT && !copy.equals(sct)) { throw new IllegalStateException( "Was unable to duplicate provided SelectedChannelType:" + sct); } pages.push(copy); }
public void visit(SelectedChannelType sct) { element("SourceChannelName", sct.getChannelName()); final ContrastEnhancement ce = sct.getContrastEnhancement(); if (ce != null) ce.accept(this); }
public SelectedChannelTypeBuilder reset(SelectedChannelType selectedChannelType) { if (selectedChannelType == null) { return reset(); } contrastEnhancement.reset(selectedChannelType.getContrastEnhancement()); channelName = selectedChannelType.getChannelName(); unset = false; return this; }
@Override protected void encode(SelectedChannelType channel) { push(band.key); put("name", channel.getChannelName().evaluate(null, String.class)); if (!emptyContrastEnhancement(channel.getContrastEnhancement())) { inline(new ContrastEnhancementEncoder(channel.getContrastEnhancement())); } } }
protected SelectedChannelType copy(SelectedChannelType selectedChannelType) { if (selectedChannelType == null) return null; ContrastEnhancement enhancement = copy(selectedChannelType.getContrastEnhancement()); Expression name = (Expression) selectedChannelType.getChannelName().accept(copyFilter, null); SelectedChannelType copy = sf.createSelectedChannelType(name, enhancement); return copy; }
/** * Takes into account that the band selection has been delegated down to the reader by producing * a new channel selection * * @param symbolizer * @return */ public static RasterSymbolizer setupSymbolizerForBandsSelection(RasterSymbolizer symbolizer) { ChannelSelection selection = symbolizer.getChannelSelection(); final SelectedChannelType[] originalChannels = selection.getSelectedChannels(); if (originalChannels != null) { int i = 0; SelectedChannelType[] channels = new SelectedChannelType[originalChannels.length]; for (SelectedChannelType originalChannel : originalChannels) { // Remember, channel indices start from 1 SelectedChannelTypeImpl channel = new SelectedChannelTypeImpl(); channel.setChannelName(Integer.toString(i + 1)); channel.setContrastEnhancement(originalChannel.getContrastEnhancement()); channels[i] = channel; i++; } ChannelSelectionUpdateStyleVisitor channelsUpdateVisitor = new ChannelSelectionUpdateStyleVisitor(channels); symbolizer.accept(channelsUpdateVisitor); return (RasterSymbolizer) channelsUpdateVisitor.getCopy(); } return symbolizer; }
@Override public void visit(SelectedChannelType sct) { if (sct.getContrastEnhancement() != null) { sct.getContrastEnhancement().accept(this); } }
bandSelectionNode.addSink(contrastenhancementNode); contrastenhancementNode.visit( channel != null ? channel.getContrastEnhancement() : null);
@Override protected ContrastEnhancement getContrastEnhancement( GroupIdEnum id, ChannelSelection channelSelection) { if (id == GroupIdEnum.RASTER_GREY_CHANNEL_OPTION) { return channelSelection.getGrayChannel().getContrastEnhancement(); } return null; }
@Override protected ContrastEnhancement getContrastEnhancement( GroupIdEnum id, ChannelSelection channelSelection) { if (id == GroupIdEnum.RASTER_RGB_CHANNEL_OPTION) { SelectedChannelType[] channelTypes = channelSelection.getRGBChannels(); return channelTypes[0].getContrastEnhancement(); } return null; }
@Override protected ContrastEnhancement getContrastEnhancement( GroupIdEnum id, ChannelSelection channelSelection) { if (id == GroupIdEnum.RASTER_RGB_CHANNEL_OPTION) { SelectedChannelType[] channelTypes = channelSelection.getRGBChannels(); return channelTypes[1].getContrastEnhancement(); } return null; }
@Override protected ContrastEnhancement getContrastEnhancement( GroupIdEnum id, ChannelSelection channelSelection) { if (id == GroupIdEnum.RASTER_RGB_CHANNEL_OPTION) { SelectedChannelType[] channelTypes = channelSelection.getRGBChannels(); return channelTypes[2].getContrastEnhancement(); } return null; }
final ContrastEnhancement cntEnh = postBandSelectionChannel.getContrastEnhancement(); ContrastMethod method = cntEnh.getMethod();
public void setEdited(SelectedChannelType channel) { this.channel = channel; if (channel != null) { guiName.setText(channel.getChannelName()); guiContrast.setEdited(channel.getContrastEnhancement()); } }
public void visit(SelectedChannelType sct) { final SelectedChannelType copy = sf.createSelectedChannelType(sct.getChannelName(), copy(sct.getContrastEnhancement())); if (STRICT && !copy.equals(sct)) { throw new IllegalStateException("Was unable to duplicate provided SelectedChannelType:" + sct); } pages.push(copy); }
@Override protected ContrastEnhancement getContrastEnhancement(RasterSymbolizer rasterSymbolizer) { if (rasterSymbolizer != null) { ChannelSelection channelSelection = rasterSymbolizer.getChannelSelection(); if (channelSelection != null) { SelectedChannelType greyChannel = channelSelection.getGrayChannel(); if (greyChannel != null) { return greyChannel.getContrastEnhancement(); } } } return null; }
protected SelectedChannelType copy(SelectedChannelType selectedChannelType) { if( selectedChannelType == null ) return null; ContrastEnhancement enhancement = copy( selectedChannelType.getContrastEnhancement() ); String name = selectedChannelType.getChannelName(); SelectedChannelType copy = sf.createSelectedChannelType( name, enhancement); return copy; }
public void visit(SelectedChannelType sct) { element("SourceChannelName", sct.getChannelName()); final ContrastEnhancement ce = sct.getContrastEnhancement(); if (ce != null) ce.accept(this); }
@Override protected void encode(SelectedChannelType channel) { push(band.key); put("name", channel.getChannelName().evaluate(null, String.class)); if (!emptyContrastEnhancement(channel.getContrastEnhancement())) { inline(new ContrastEnhancementEncoder(channel.getContrastEnhancement())); } } }