Medical Imaging Interaction Toolkit
2024.06.99-abf15e24
Medical Imaging Interaction Toolkit
|
Until the MITK ROI file format is going to be officially announced in a 2024 release of MITK, the file format must be considered experimental and is prone to change without any prior warning.
MITK ROI is a JSON-based file format defining a collection of region of interests (ROIs).
ROIs must have an ID (unsigned integer) and their shape is currently considered to be an axis-aligned bounding box. Its bounds are defined by minimum and maximum index coordinates, typically relative to an image. Custom properties of various known types can be optionally attached to a ROI. A few of these properties are used by MITK to define the appearance of a rendered ROI, for example:
ROIs can be optionally time-resolved and define both coordinates and properties per time step, allowing for a dynamic appearance, position, and size over time.
ROIs also display a caption at their bottom-left corner (supporting multiple lines), that can be set once per MITK ROI file for all contained ROIs. Placeholders enclosed by braces in the caption are substituted by their corresponding ROI property values at runtime. The default caption is "{name} ({ID})", where {ID}
is a special placeholder for the ID of a ROI (technically not a ROI property), and {name}
refers to the ROI property "name" (typically an mitk::StringProperty).
Last but not least the reference (image) geometry of the ROIs in an MITK ROI file must be specified to be able to map all index coordinates to actual world coordinates. A geometry is defined by an origin, the pixel/voxel spacing, a size, and optionally the number of time steps in case of a time-resolved MITK ROI file.
As all features are explained in the overview above, the JSON-based file format is defined here by two examples with minimal additional notes: one example for a static MITK ROI file and one example for a time-resolved MITK ROI file.
This example contains two ROIs for detected tumors in an image with certain confidence. Names and confidence values will be displayed in separate lines for each ROI.
Further hints:
This example only contains a single ROI but it is defined for several time steps. Fallbacks of time step properties to default properties are demonstrated as well.
Further hints:
In version 2 of the file format, geometries can be optionally defined by a linear transformation instead of origin and spacing. Such a transformation is written as 4x4 matrix in the form of a contiguous array of 16 elements. For example, the following two geometries are identical:
The latter format is more powerful as it is able to express rotated geometries.
Further hints:
[0, 0, 0, 1]
.