![]() |
ImFusion C++ SDK 4.5.0
|
#include <AnatomyPlugin/include/ImFusion/AnatomyPlugin/ASImageBasedRefine.h>
Register two AnatomicalStructure objects by registering crops of images connected to each AnatomicalStructure and propagating the image registration to the AnatomicalStructure level. More...
Register two AnatomicalStructure objects by registering crops of images connected to each AnatomicalStructure and propagating the image registration to the AnatomicalStructure level.
Public Types | |
| enum class | AlignmentMethod { DISA = 0 , LNCC = 1 , NONE = 2 , LC2 = 3 , NCC = 4 , DISA_DEMONS = 5 , DEMONS = 6 } |
| Underlying image registration class being used. | |
| Public Types inherited from ImFusion::AnatomicalStructureRegistration | |
| enum class | RegistrationType { GlobalScaledE3 = 1 << 0 , LocalScaledE3 = 1 << 1 , Deformable = 1 << 2 } |
Public Member Functions | |
| ASImageBasedRefine (SharedImageSet &fixedImg, SharedImageSet &movingImg) | |
| Constructor, which gets the (full) fixed and moving images at their initial position. | |
| bool | computeCropsAndDISA (AnatomicalStructure &fixed, AnatomicalStructure &moving, const AnatomicalStructureDeformation *init=nullptr) const |
| std::optional< AnatomicalStructureDeformation > | computeRegistration (const AnatomicalStructure &fixed, AnatomicalStructure &moving, bool rigid=false, const AnatomicalStructureDeformation *init=nullptr) const override |
| Register the two AnatomicalStructure objects. | |
| bool | canRegister (const AnatomicalStructure &fixed, AnatomicalStructure &moving, bool rigid=false, const AnatomicalStructureDeformation *init=nullptr) const override |
| Returns true if the registration can be performed, i.e. the required data is available. | |
| RegistrationType | registrationType () const override |
| The maximum type of registration supported by this class. Should return either LocalScaledE3 or Deformable. | |
| void | setProgress (Progress *progress) |
| Public Member Functions inherited from ImFusion::Configurable | |
| virtual void | configure (const Properties *p) |
| Configure this object instance by de-serializing the given Properties. | |
| virtual void | configuration (Properties *p) const |
| Serialize the current object configuration into the given Properties object. | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Public Attributes | |
| Parameter< AlignmentMethod > | p_similarityMeasure = {"similarityMeasure", AlignmentMethod::DISA, this} |
| Underlying similarity measure / registration algorithm used on the per-structure crops. | |
| Parameter< double > | p_cropResolution = {"cropResolution", 1.0, this} |
| Isotropic spacing (in mm) at which the fixed and moving image crops are resampled before running the registration. | |
| Parameter< double > | p_cropMargin = {"cropMargin", 10.0, this} |
| Additional margin (in mm) added around the mesh bounding box when cropping the images. | |
| Parameter< double > | p_weightMargin = {"weightMargin", 2.0, this} |
| Distance (in mm) inside which voxels receive full weight in the per-voxel weight map used during (deformable) registration. | |
| Parameter< double > | p_weightDecay = {"weightDecay", 2.0, this} |
| Characteristic length (in mm) of the exponential decay of the voxel weight map outside p_weightMargin. | |
| Parameter< double > | p_fixedMaskThreshold = {"fixedMaskThreshold", 10.0, this} |
| Distance threshold (in mm) used to mask the fixed image for the linear similarity measures (NCC, LNCC, LC2): voxels further than fixedMaskThreshold mm from the fixed structure's mesh are masked out and do not contribute to the similarity. | |
| Parameter< std::optional< int > > | p_numResolutionLevels = {"numResolutionLevels", std::nullopt, this} |
| Number of resolution levels used by the deformable (DEMONS-family) multi-resolution pyramid. | |
| Parameter< std::optional< double > > | p_alpha = {"alpha", std::nullopt, this} |
| Override for the alpha parameter of the underlying DemonsImageRegistration (weighting of the squared-difference term in the demons denominator). | |
| Parameter< bool > | p_useDistanceVolumesAsTargetChannel = {"useDistanceVolumesAsTargetChannel", true, this} |
| If true (and both the fixed and moving structures have meshes), a truncated distance volume of the mesh is appended as an extra channel to the registration target. | |
| Public Attributes inherited from ImFusion::Configurable | |
| Signal | signalParametersChanged |
| Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Additional Inherited Members | |
| Protected Attributes inherited from ImFusion::Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
overridevirtual |
Register the two AnatomicalStructure objects.
Here fixed is the AnatomicalStructure on fixedImg, moving is the AnatomicalStructure on the (inital) moving image (movingImg in the constructor), rigid controls whether the (affine) linear parts of the result should be rigid as opposed to also allowing scaling, and init contains an initial registration from moving to fixed coming from e.g. previous registration methods.
Implements ImFusion::AnatomicalStructureRegistration.
|
overridevirtual |
Returns true if the registration can be performed, i.e. the required data is available.
Implements ImFusion::AnatomicalStructureRegistration.
|
inlineoverridevirtual |
The maximum type of registration supported by this class. Should return either LocalScaledE3 or Deformable.
Implements ImFusion::AnatomicalStructureRegistration.
| Parameter<AlignmentMethod> ImFusion::ASImageBasedRefine::p_similarityMeasure = {"similarityMeasure", AlignmentMethod::DISA, this} |
Underlying similarity measure / registration algorithm used on the per-structure crops.
See AlignmentMethod for the available options. Linear methods (DISA, LNCC, LC2) produce affine transformations; DEMONS variants produce dense deformation fields.
| Parameter<double> ImFusion::ASImageBasedRefine::p_cropResolution = {"cropResolution", 1.0, this} |
Isotropic spacing (in mm) at which the fixed and moving image crops are resampled before running the registration.
Smaller values give more accurate results at the cost of compute and memory.
| Parameter<double> ImFusion::ASImageBasedRefine::p_cropMargin = {"cropMargin", 10.0, this} |
Additional margin (in mm) added around the mesh bounding box when cropping the images.
Controls how much of the tissue surrounding each structure participates in the registration.
| Parameter<double> ImFusion::ASImageBasedRefine::p_weightMargin = {"weightMargin", 2.0, this} |
Distance (in mm) inside which voxels receive full weight in the per-voxel weight map used during (deformable) registration.
Voxels within weightMargin mm of the structure surface contribute fully; beyond this distance the weight starts to decay exponentially (see p_weightDecay). Intended to focus the registration on the immediate neighborhood of the structure.
| Parameter<double> ImFusion::ASImageBasedRefine::p_weightDecay = {"weightDecay", 2.0, this} |
Characteristic length (in mm) of the exponential decay of the voxel weight map outside p_weightMargin.
Concretely, for a voxel at distance d > weightMargin from the structure, the weight is exp(-(d - weightMargin) / weightDecay). Larger values make the weight map drop off more slowly, including more of the surrounding tissue in the registration.
| Parameter<double> ImFusion::ASImageBasedRefine::p_fixedMaskThreshold = {"fixedMaskThreshold", 10.0, this} |
Distance threshold (in mm) used to mask the fixed image for the linear similarity measures (NCC, LNCC, LC2): voxels further than fixedMaskThreshold mm from the fixed structure's mesh are masked out and do not contribute to the similarity.
Has no effect for the DISA/DEMONS variants, which instead use the weight map controlled by p_weightMargin / p_weightDecay.
| Parameter<std::optional<int> > ImFusion::ASImageBasedRefine::p_numResolutionLevels = {"numResolutionLevels", std::nullopt, this} |
Number of resolution levels used by the deformable (DEMONS-family) multi-resolution pyramid.
If unset, the underlying DemonsAlgorithm chooses a default based on the image size.
| Parameter<std::optional<double> > ImFusion::ASImageBasedRefine::p_alpha = {"alpha", std::nullopt, this} |
Override for the alpha parameter of the underlying DemonsImageRegistration (weighting of the squared-difference term in the demons denominator).
If unset, the DemonsImageRegistration default (currently 2.0) is used. Has no effect for the linear similarity measures.
| Parameter<bool> ImFusion::ASImageBasedRefine::p_useDistanceVolumesAsTargetChannel = {"useDistanceVolumesAsTargetChannel", true, this} |
If true (and both the fixed and moving structures have meshes), a truncated distance volume of the mesh is appended as an extra channel to the registration target.
The registration then tries to simultaneously match image intensity/descriptor channels and the distance volume, which anchors the deformation to the mesh surface. If false, only the image-based channels are used and the distance-volume channel is weighted with zero.