Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused old method #401

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,6 @@ private static Band createFilterBand(Filter filter, String bandName, Band band)
return targetBand;
}

private static Band createFilterBand_bak(Filter filter, String bandName, Band band) {
FilterBand filterBand;
if (filter instanceof KernelFilter) {
final KernelFilter kernelFilter = (KernelFilter) filter;
filterBand = new ConvolutionFilterBand(bandName, band, kernelFilter.kernel, 1);
} else {
final GeneralFilter generalFilter = (GeneralFilter) filter;
filterBand = new GeneralFilterBand(bandName, band, generalFilter.operator, getKernel(generalFilter), 1);
}
final Band targetBand = new Band(bandName, ProductData.TYPE_FLOAT32, band.getRasterWidth(), band.getRasterHeight());
ProductUtils.copyRasterDataNodeProperties(band, targetBand);
ProductUtils.copySpectralBandProperties(band, targetBand);
targetBand.setDescription(String.format("Filter ''%s''", filter));
targetBand.setSourceImage(filterBand.getSourceImage());
return targetBand;
}

private static Kernel getKernel(GeneralFilter filter) {
final double[] kernelData = new double[filter.width * filter.height];
Arrays.fill(kernelData, 1.0);
Expand Down