// TODO: Detect if source and destination rasters are the same. If they are
// the same, we should skip this block. Iteration will then be faster.
iterator = TransfertRectIter.create(RectIterFactory.create(source, bounds), iterator);
}
int band = 0;
if (!iterator.finishedBands()) do {
categories[band++].transform(iterator);
}
while (!iterator.nextBandDone());
assert band == categories.length : band;
}