I’ve just merged the implementations of RFC-483 and RFC-486, which overhaul how __getitem__
and __setitem__
work on image-like objects.
I’ll post here with a link to complete documentation once it’s built (this evening with the next daily/weekly, I believe), but the summary is:
- The single-pixel
get
andset
methods have been removed; everything you could do with them can now be done with__getitem__
and__setitem__
. - Image-like objects (
Image
,Mask
,MaskedImage
,Exposure
) can be be indexed with pairs of (x, y) integers, pairs of (x, y) slices,Point2I
s, andBox2I
s. - The default origin in Python is now
PARENT
(i.e. xy0 is accounted for). PassLOCAL
as the last argument inside the square brackets to ignore xy0. - If you want to use negative indexes as an offset from the end, you must use
LOCAL
(as pixels may naturally have negative indices inPARENT
).