API Documentation
Loading...
Searching...
No Matches
GeometryRegistration.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/SoftwareService.h>
4#include <NDEVR/GeometryVertices.h>
5#include <NDEVR/DesignCommand.h>
6#include <NDEVR/Model.h>
7#include <NDEVR/Buffer.h>
8#include <NDEVR/RGBColor.h>
9#include <NDEVR/GenericOption.h>
10
11namespace NDEVR
12{
13 class Geometry;
14 template<uint01 t_dims, class t_type> class RTree;
15 /**--------------------------------------------------------------------------------------------------
16 \brief Describes special options/parameters for a GeometryRegistration engine
17 **/
22 /**--------------------------------------------------------------------------------------------------
23 \brief Describes options/parameters for running the GeometryRegistration
24 **/
38
39 /**--------------------------------------------------------------------------------------------------
40 \brief A service that contains registered algorithms for registering geometry such that the input is
41 adjusted to match the output. See https://en.wikipedia.org/wiki/Point-set_registration.
42 **/
44 {
45 protected:
46 explicit GeometryRegistration(const String& name, const String& id);
47
48 public:
51 static void ExecuteRegistration(const JSONNode& active_filters, const Buffer<Model>& models_to_register, const Buffer<Model>& reference_models, ProgressInfo* log, const void* lock);
55 public:
58 public://Override These Functions
59 virtual ~GeometryRegistration() = default;
60 virtual bool runRegistration(GeometryRegistrationParameters& parameters) = 0;
61 //Returns whether or not the filter can be applied given the target parameters. Default true
62 virtual bool canRunRegistration(const GeometryRegistrationParameters&) { return true; }
64 public:
65 [[nodiscard]] const TranslatedString& registrationName() const { return m_name; }
66 [[nodiscard]] const String& registrationID() const { return m_id; }
67 protected:
70 protected:
71 static void PrepareForRegistration(const Matrix<fltp08>& transform, const Geometry& geo, GeometryRegistrationParameters& params, bool is_reference);
72 static void FinishRegistration(const Matrix<fltp08>& transform, Geometry& geo, const GeometryRegistrationParameters& params);
73 protected:
75 };
76}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
Stores a groups of GenericOptions that can be used to group them.
Definition GenericOptions.h:151
A core class within the model heirarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:64
A service that contains registered algorithms for registering geometry such that the input is adjuste...
Definition GeometryRegistration.h:44
const String & registrationID() const
Definition GeometryRegistration.h:66
virtual bool canRunRegistration(const GeometryRegistrationParameters &)
Definition GeometryRegistration.h:62
static void ExecuteRegistration(const JSONNode &active_filters, const Buffer< Model > &models_to_register, const Buffer< Model > &reference_models, ProgressInfo *log, const void *lock)
const TranslatedString & registrationName() const
Definition GeometryRegistration.h:65
static const Dictionary< String, GeometryRegistration * > & AvailableRegistrationEngines()
String m_id
Definition GeometryRegistration.h:69
static Dictionary< String, GeometryRegistration * > s_global_available_registration_engines
Definition GeometryRegistration.h:74
GeometryRegistration(const GeometryRegistration &&filter)=delete
static Buffer< GeometryRegistrationDescription > GetAvailableDescriptions()
static void FinishRegistration(const Matrix< fltp08 > &transform, Geometry &geo, const GeometryRegistrationParameters &params)
static String ToCommandString(const Buffer< GeometryRegistrationDescription > &descriptions)
GeometryRegistration(const String &name, const String &id)
static void PrepareForRegistration(const Matrix< fltp08 > &transform, const Geometry &geo, GeometryRegistrationParameters &params, bool is_reference)
virtual ~GeometryRegistration()=default
static void AddAvailableRegistrationEngine(GeometryRegistration *filter)
TranslatedString m_name
Definition GeometryRegistration.h:68
GeometryRegistration(const GeometryRegistration &filter)=delete
virtual Buffer< GeometryRegistrationDescription > defaultRegistrationArguments()
static DynamicPointer< DesignCommand > RegistrationCommand(const UUID &reference, const GeometryRegistrationDescription &filter)
virtual bool runRegistration(GeometryRegistrationParameters &parameters)=0
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
Definition JSONParser.h:60
Definition Matrix.hpp:176
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Software Services provide an interface for adding to or changing the software behavior via functional...
Definition SoftwareService.h:9
Software Service Managers take a Software service to modify the behavior of the software.
Definition SoftwareService.h:15
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Describes special options/parameters for a GeometryRegistration engine.
Definition GeometryRegistration.h:19
GeometryRegistrationDescription(const TranslatedString &name, const String &filter_id)
Describes options/parameters for running the GeometryRegistration.
Definition GeometryRegistration.h:26
Matrix< fltp08 > reference_transform
Definition GeometryRegistration.h:31
Buffer< Matrix< fltp08 > > potential_a_to_b_transform
Definition GeometryRegistration.h:28
Buffer< GeometryVertices > registration_points
Definition GeometryRegistration.h:33
std::function< void(uint04 iteration_a, uint04 iteration_b, Matrix< fltp08 > &mat, bool finished)> update_data_callback
Definition GeometryRegistration.h:35
GeometryVertices reference
Definition GeometryRegistration.h:32
Buffer< Matrix< fltp08 > > original_transforms
Definition GeometryRegistration.h:34
An container for storing some number of vertices for editing.
Definition GeometryVertices.h:18