Memory consumption
JisM aims to reduce memory consumption. There is no pixel object, pixel's intensities are stored in a buffer. A pixel is described by a unique integer id. This id is computed with pixel's coordinates. For example, in a 2D image, pixel id at position (x,y) will be x*width+y.
Context assumes that a pixel id will be between 0 and the number of pixels. A negative id is an invalid id.
An id is coded with a 32-bits integer so memory consumption will be 4*n bytes where n is the number of pixels.
Image colorspace
Actually, JisM creates grayscale context, but pixel's intensities can be larger than 255.
Segmented image
Segmented images are a context which gives a region id as pixel's intensity. This allows a better handling of segmented image for writing for example. By default, region's id are coded with a 16-bits integer but if regions count is more than the max 16-bits value then segmented image enters in a 32-bits mode.