Open tbirdso opened 9 months ago
Could be a good first issue for someone looking to learn more about ITK C++ module development. Logic is already specified/implemented and available for reference in itk_dreg.reduce_dfield.transform_collection
, with tasks outlined above.
Background
itk_dreg.reduce_dfield
implements theTransformCollection
class.TransformCollection
extends theitk.Transform
effective interface to composite results from multiple piecewise input transforms to a single point output.itk_dreg.reduce_dfield
relies onTransformCollection
to sample a single output deformation field result based on multiple subimage registration transforms.Current Implementation
TransformCollection
is implemented as a pure Python class that runs sampling in serial. As a result, its execution time is rather slow.Meanwhile as a pure Python class
TransformCollection
is not considered to be a subclass ofitk.Transform
and thus cannot be provided to ITK process objects as a valid input.Feature Request
We should create an ITK external module (
ITKTransformCollection
,ITKTransformBlending
,ITKPiecewiseTransform
, or similar) and re-implementTransformCollection
there as an ITK C++ class.Suggested steps:
TransformCollection.blend_simple_mean
logic.TransformCollection.blend_distance_weighted_mean
logic.TransformEntry
in C++ according to the specification:itk.TransformBase
inputOptional[itk.Image]
initk_dreg
to specify that a domain may be an oriented bounding box in 3D physical space as described by an unbuffereditk.Image
with metadata. The equivalent representation in C++ would bestd::optional<itk::Image<PixelType, Dimension>>
. There may be other valid specifiers for a generic 3D region that could be used.itk.TransformBase
to define aTransformPoint
function. This is not required, but would allow theTransformEntry
to be used in generic ITK filters to describe a piecewise function. May be reasonable to effectively return a translation of 0 for any input points outside of a bounded domain.PiecewiseTransformFunction
,BoundedTransform
, etc.TransformCollection
class according to the following specification:itk.TransformBase
itk.TransformEntry
piecewise transform instancesTransformPoint
such that: