Defining items
Items are containers for data; see Items for the items that are provided and why data is wrapped in them.
To create a new item, you can simply subtype Item:
struct MyItem <: Item
data
endThe only function that is expected to be implemented is itemdata, which simply returns the wrapped data. If, as above, you simply call the field holding the data data, you do not need to implement it. The same goes for the DataAugmentation.setdata helper.
For some items, it also makes sense to implement the following:
DataAugmentation.showitem!(img, item::I)creates a visual representation of an item on top ofimg.
To make a transformation work with your item, see Defining transformations. For spatial items that should support projective transformations, see Defining projective transformations.