Add support for working with "volumetric": segmentations, i.e. regularly spaced frames in a 3D frame of reference. Specifically:
Upon construction, detect automatically whether a segmentation is a 3D volume and populate the "DimensionOrganizationType" attribute as "3D". This is in line with the proposed precise definition of "3D" that was (loosely) agreed upon at NAMIC Project Week (see project page above for details). [COMPLETED]
Add a convenience method to create a segmentation from a volumetric array and its associated affine matrix. [TO DO]
Upon reading, detect whether a segmentation is "volumetric" and add a method to retrieve a segmentation ordered according to geometry if it is volumetric. Additionally a way to access the associated affine matrix to enable interfacing with other libraries (sitk, nibabel, monai) more easily in the future. [IN PROGRESS]
Details
In order to do this, I have generalized the existing highdicom.seg.sop._SegDBManager class to create a general highdicom._multiframe.MultiFrameDBManager class to handle the logic of storing an in-memory sqlite database of per-frame information for general multiframe object. This simplifies the process of inspecting the geometry of subsets of frames and will also make it much easier to do similar things for other multiframe objects in the future (e.g. parametric maps, labelmap segmentations)
Branch for NAMIC project week 40. Project page.
Goals
Add support for working with "volumetric": segmentations, i.e. regularly spaced frames in a 3D frame of reference. Specifically:
Details
In order to do this, I have generalized the existing
highdicom.seg.sop._SegDBManager
class to create a generalhighdicom._multiframe.MultiFrameDBManager
class to handle the logic of storing an in-memory sqlite database of per-frame information for general multiframe object. This simplifies the process of inspecting the geometry of subsets of frames and will also make it much easier to do similar things for other multiframe objects in the future (e.g. parametric maps, labelmap segmentations)