![]() |
ImFusion SDK 4.3
|
#include <AnatomyPlugin/include/ImFusion/AnatomyPlugin/ASCRegistration.h>
Registration between two AnatomicalStructureCollections. More...
Inheritance diagram for ASCRegistration:Registration between two AnatomicalStructureCollections.
The registration is performed by one of several registration methods (e.g. based on stored points, meshes, images...) And is (if necessary) restricted to a registration type (global linear, linear for each AnatomicalStructure, deformable, etc...).
Public Types | |
| enum class | RegistrationMethod { Automatic , PointsAndPlanes , DeformableMeshRegistration , RigidImages , PointsRigidScaling , None , CustomRegistrationSequence } |
| enum class | RegistrationMode { MoveMoving , CreateCopy , RawResult , OnlyRegister } |
| using | RegistrationType = AnatomicalStructureRegistration::RegistrationType |
| using | RegistrationSequence = std::vector<std::unique_ptr<ASCRegistrationMethod>> |
Public Types inherited from Algorithm | |
| enum | Status { Unknown = -1 , Success = 0 , Error = 1 , InvalidInput , IncompleteInput , OutOfMemoryHost , OutOfMemoryGPU , UnsupportedGPU , UnknownAction , AbortedByUser , User = 1000 } |
| Status codes. More... | |
Public Member Functions | |
| ASCRegistration (AnatomicalStructureCollection &fixed, AnatomicalStructureCollection &moving, SharedImageSet *fixedImg=nullptr, SharedImageSet *movingImg=nullptr) | |
| void | compute () override |
| Resets the registration, and then runs the provided registration sequence. | |
| void | refine () |
| Like compute, but does not call reset() first. | |
| void | interpolate (double p, bool applyGlobal=true, AnatomicalStructureCollection *out=nullptr) |
Interpolates along the stored registration result between the fixed and moving ASCs. If out is null, uses the last stored result as output. | |
| void | perturb (double p, bool applyGlobal=false) |
Pushes the moving image by a factor p (in [0,1], typically very small) towards the fixed image "along" the registration. | |
| Algorithm::Status | reset () |
| Algorithm::Status | mapForward (SharedImageSet &ct) |
| Helper function that applies the deformation to a volume using the ApplyASCDeformation algorithm. | |
| Algorithm::Status | mapBackward (SharedImageSet &ct) |
| Helper function taht applies the inverse deformation to a volume using the ApplyASCDeformation algorithm. | |
| OwningDataList | takeOutput () override |
| Return any new Data that was created by the Algorithm during the last call to compute(). | |
| void | configureRegistrationMethodProperties (const Properties &properties) |
| Configures the last element of the registration sequence. | |
| SharedImageSet * | movingImage () |
| SharedImageSet * | undeformedImage () |
| DataList | movingData () override |
| The "moving" data structure(s) relative to which the movingASC AnatomicalStructureCollection is defined. | |
| DataList | fixedData () override |
| The "fixed" data structure(s) relative to which the fixedASC AnatomicalStructureCollection is defined. | |
| std::optional< ASCDeformation > & | storedResult () |
| std::optional< ASCDeformation > const & | storedResult () const |
| AnatomicalStructureCollection & | fixed () |
| AnatomicalStructureCollection & | moving () |
| AnatomicalStructureCollection * | movingOnUndeformedImage () |
| AnatomicalStructureCollection * | fixedASC () override |
| AnatomicalStructureCollection * | movingASC () override |
| const RegistrationSequence & | registrationMethodSequence () const |
| void | removeFromRegistrationSequence (int index, bool triggerSignal=true) |
| bool | insertIntoRegistrationSequence (int index, std::unique_ptr< ASCRegistrationMethod > method, bool triggerSignal=true) |
| Insert a method into the registration sequence at the given index. | |
| bool | appendToRegistrationSequence (std::unique_ptr< ASCRegistrationMethod > method, bool triggerSignal=true) |
| Append a method to the registration sequence. | |
| bool | insertIntoRegistrationSequence (int index, const std::string &identifier, bool triggerSignal=true) |
Convenience function for creating method based on identifier from factory For the PerAnatomyAutomatic registration method, sets this as the reg member of the method. | |
| void | replaceRegistrationSequence (RegistrationSequence methods, bool triggerSignal=true) |
| void | replaceRegistrationSequence (const std::vector< std::string > &methods, bool triggerSignal=true) |
Convenience function for creating methods based on identifiers from factory For the PerAnatomyAutomatic registration method, sets this as the reg member of the method. | |
| ASCRegistrationMethod::Factory & | registrationMethodFactory () |
| const ASCRegistrationMethod::Factory & | registrationMethodFactory () const |
Public Member Functions inherited from ASCRegistrationInterface | |
| virtual std::unique_ptr< AnatomicalStructureCollection > | takeMovingASC () |
| virtual std::unique_ptr< AnatomicalStructureCollection > | takeFixedASC () |
Public Member Functions inherited from Algorithm | |
| Algorithm () | |
| Default constructor will registers a single "compute" action that calls compute() and returns status(). | |
| virtual void | setProgress (Progress *progress) |
| Sets a Progress interface the algorithm can use to notify observers about its computing progress. | |
| Progress * | progress () const |
| Returns the progress interface if set. | |
| virtual int | status () const |
| Indicates the status of the last call to compute(). | |
| virtual bool | survivesDataDeletion (const Data *) const |
| Indicates whether the algorithm can handle (partial) deletion of the specified data, by default this checks whether the data is in the input list. | |
| const FactoryInfo & | factoryInfo () const |
| Returns the record describing how this Algorithm was instantiated by the AlgorithmFactory. | |
| void | setFactoryInfo (const FactoryInfo &value) |
| Sets the record describing how this Algorithm was instantiated by the AlgorithmFactory. | |
| Status | runAction (const std::string &id) |
Run the action with name id if it exists. | |
| const std::vector< Action > & | actions () |
| Get a mapping from Action id to Action as registered in this algorithm. | |
Public Member Functions inherited from 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 Member Functions inherited from SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (SignalReceiver rhs) |
| Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
| virtual | ~SignalReceiver () |
| Virtual destructor disconnects from all connected signals. | |
Static Public Member Functions | |
| static bool | createCompatible (DataList dl, Algorithm **alg) |
Static Public Member Functions inherited from Algorithm | |
| static bool | createCompatible (const DataList &data, Algorithm **a=nullptr) |
| Factory function to check algorithm compatibility with input data and optionally instantiate it. | |
Public Attributes | |
| Parameter< RegistrationType > | p_registrationType |
| Which deformation type to output. | |
| Parameter< RegistrationMethod > | p_registrationMethod = {"registrationMethod", RegistrationMethod::Automatic, *this} |
| Which underlying registration method to use. | |
| Parameter< RegistrationMode > | p_registrationMode = {"registrationMode", RegistrationMode::CreateCopy, *this} |
| What kind of output to create (or not create) | |
| Parameter< bool > | p_createMissingObjects = {"createMissingObjects", true, *this} |
| If set to true, objects (meshes, keypoints, etc...) are created in the output based on the linear part of the deformation even if they are not present in the input. | |
| Parameter< bool > | p_createMissingAnatomicalStructures = {"createMissingAnatomicalStructures", false, *this} |
| If set to true, anatomical structures are created in the output based on the (global) linear part of the deformation. | |
| Parameter< std::optional< std::vector< std::string > > > | p_identifiers = {"identifiers", std::nullopt, *this} |
| Registration is restricted to Anatomical structures with the given identifiers if set. | |
| Parameter< bool > | p_globalUnitScaling = {"globalUnitScaling", true, *this} |
| Sets the global scaling to 1. This is useful to avoid changing the spacing when applied to a volume. | |
| Parameter< bool > | p_rigidSegments = {"rigid", false, *this} |
| If set to true, the scaling is either discarded or moved to the deformable parts of the registration. | |
| Parameter< double > | p_deformationFieldResolution = {"deformationFieldResolution", 4.0, *this} |
| If creating a deformation for a moving image, this resolution will be used for the (dense) deformation. | |
| Signal | signalRegistrationSequenceChanged |
Public Attributes inherited from ASCRegistrationInterface | |
| Signal | signalMovingASCCreated |
| For algorithms that additionally create an AnatomicalStructureCollection, this signal can be used to trigger actions that need to be performed once the AnatomicalStructureCollection has been created. | |
| Signal | signalFixedASCCreated |
| For algorithms that additionally create an AnatomicalStructureCollection, this signal can be used to trigger actions that need to be performed once the AnatomicalStructureCollection has been created. | |
Public Attributes inherited from Algorithm | |
| Signal | signalOutputChanged |
| Signal should be emitted by Algorithms when their output/result has changed. | |
| Signal | signalParametersChanged |
| Signal should be emitted by Algorithms when their parameter configuration has changed. | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Additional Inherited Members | |
Protected Member Functions inherited from Algorithm | |
| void | loadDefaults () |
| void | registerAction (const std::string &id, const std::string &guiName, const std::function< Algorithm::Status(void)> &action) |
| Register an action to be run via runAction. | |
| template<typename D> | |
| void | registerAction (const std::string &id, const std::string &guiName, Algorithm::Status(D::*action)(void)) |
| Template version of runAction that can be used with a pointer to a member function. | |
| void | registerAction (const Action &action) |
| Register an action. | |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
Protected Attributes inherited from Algorithm | |
| std::string | m_name |
| Algorithm name. | |
| Progress * | m_progress = nullptr |
| Non-owing pointer to a progress interface. May be a nullptr. | |
| FactoryInfo | m_factoryInfo = {} |
| Record describing how this algorithm was instantiated by the AlgorithmFactory. | |
| int | m_status = Status::Unknown |
| Algorithm status after last call to compute() | |
| std::vector< Action > | m_actions |
| Map of key given by the id of the action, of the available actions of this algorithm. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
overridevirtual |
Resets the registration, and then runs the provided registration sequence.
Implements Algorithm.
|
overridevirtual |
| void configureRegistrationMethodProperties | ( | const Properties & | properties | ) |
Configures the last element of the registration sequence.
|
inlineoverridevirtual |
The "moving" data structure(s) relative to which the movingASC AnatomicalStructureCollection is defined.
The typical use-case for this is the image on which a segmentation algorithm then extracts an AnatomicalStructureCollection.
Implements ASCRegistrationInterface.
|
inlineoverridevirtual |
The "fixed" data structure(s) relative to which the fixedASC AnatomicalStructureCollection is defined.
The typical use-case for this is the image on which a segmentation algorithm then extracts an AnatomicalStructureCollection.
Implements ASCRegistrationInterface.
|
inlineoverridevirtual |
Implements ASCRegistrationInterface.
|
inlineoverridevirtual |
Implements ASCRegistrationInterface.
| bool insertIntoRegistrationSequence | ( | int | index, |
| std::unique_ptr< ASCRegistrationMethod > | method, | ||
| bool | triggerSignal = true ) |
Insert a method into the registration sequence at the given index.
If method is nullptr, a dummy (ASCRegistrationMethod::ReturnError) is inserted at the given position.
|
inline |
Append a method to the registration sequence.
If method is nullptr, a dummy (ASCRegistrationMethod::ReturnError) is appended.
| Parameter<RegistrationType> p_registrationType |
Which deformation type to output.
Resulting deformation is filtered to match this type. Not all registration types support all deformation types.
| Parameter<std::optional<std::vector<std::string> > > p_identifiers = {"identifiers", std::nullopt, *this} |
Registration is restricted to Anatomical structures with the given identifiers if set.