Combination View Flat View Tree View
Threads [ Previous | Next ]
Critical virtual bands bug
toggle
Critical virtual bands bug
2/17/10 7:56 PM
In the current 4.7 the GPF has lost the ability to process virtual bands.

If an operator creates a new virtual band in the target product
createImages in OperatorExecute throws with "The band '%s' of the '%s' does not have an associated target image."

This used to work before and it is very critical that it continue to work as quite a few operators create virtual bands.

This can be fixed with the following change in OperatorExecute

 1
 2   private static PlanarImage[] createImages(Band[] targetBands, OperatorContext operatorContext) {
 3        final ArrayList<PlanarImage> images = new ArrayList<PlanarImage>(targetBands.length);
 4        for (final Band band : targetBands) {
 5            OperatorImage operatorImage = operatorContext.getTargetImage(band);
 6            if (operatorImage != null) {
 7                images.add(operatorImage);
 8            }
 9        }
10        return images.toArray(new PlanarImage[images.size()]);
11    }


Thanks
Luis
Flag Flag
RE: Critical virtual bands bug
2/18/10 1:45 PM as a reply to Luis Veci.
Thank you Luis for the fix,
I just pushed it to our repository.

Regards,
Marco
Flag Flag

 

Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums: