As you can tell by the title of this ticket, I was originally envisioning a computeDimensions method, but settled on computeBBox. Thanks for asking, because the reasoning should be recorded here for future reference.
- CoaddPsf and WarpedPsf (in computeBBoxFromTransform) need the full BBox of their component Psfs to compute the bounding BBox.
- Some component Psfs (PcaPsf for example), contain kernels with getBBox methods.
- Instead of having CoaddPsf and WarpedPsf read the dimensions and construct the bbox, I assume their contained Psfs best know how to compute their own bbox, and let them do it.
2) Allows some code reuse within each PSF class: doComputeKernelImage creates an empty image with bbox = computeBbox() (with the exception of PsfexPsf)
3) A BBox2I doesn't weigh much more than an Extent2I
4) BBox->dimensions is simpler than dimensions->BBox. As a user: I can confidently write bbox.getDimensions(), whereas I would want to double check that I got the right starting point when faced with odd and even dimensions when I write: BBox2I(Point2I(-dim.getWidth//2, -dim.getHeight//2), dim))