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/GeometryVertices.h>
4#include <NDEVR/DesignCommand.h>
5#include <NDEVR/Model.h>
6#include <NDEVR/Buffer.h>
7#include <NDEVR/RGBColor.h>
8#include <NDEVR/GenericOption.h>
9
10namespace NDEVR
11{
12 class Geometry;
13 template<uint01 t_dims, class t_type> class RTree;
31
33 {
34 protected:
35 explicit GeometryRegistration(const String& name, const String& id);
36
37 public:
38 static const Dictionary<String, GeometryRegistration*>& AvailableRegistrationEngines();
39 static void AddAvailableRegistrationEngine(GeometryRegistration* filter);
40 static void ExecuteRegistration(const JSONNode& active_filters, const Buffer<Model>& models_to_register, const Buffer<Model>& reference_models, ProgressInfo* log, const void* lock);
41 static Buffer<GeometryRegistrationDescription> GetAvailableDescriptions();
42 static String ToCommandString(const Buffer<GeometryRegistrationDescription>& descriptions);
43 static DynamicPointer<DesignCommand> RegistrationCommand(const UUID& reference, const GeometryRegistrationDescription& filter);
44 public:
47 public://Override These Functions
48 virtual ~GeometryRegistration() = default;
49 virtual bool runRegistration(GeometryRegistrationParameters& parameters) = 0;
50 //Returns whether or not the filter can be applied given the target parameters. Default true
51 virtual bool canRunRegistration(const GeometryRegistrationParameters&) { return true; }
52 virtual Buffer<GeometryRegistrationDescription> defaultRegistrationArguments();
53 public:
54 [[nodiscard]] const TranslatedString& registrationName() const { return m_name; }
55 [[nodiscard]] const String& registrationID() const { return m_id; }
56 protected:
59 protected:
60 static void PrepareForRegistration(const Matrix<fltp08>& transform, const Geometry& geo, GeometryRegistrationParameters& params, bool is_reference);
61 static void FinishRegistration(const Matrix<fltp08>& transform, Geometry& geo, const GeometryRegistrationParameters& params);
62 protected:
64 };
65}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:77
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Dictionary.h:48
Definition Pointer.hpp:303
Definition GenericOptions.h:145
Definition Geometry.h:64
Definition GeometryRegistration.h:33
const String & registrationID() const
Definition GeometryRegistration.h:55
virtual bool canRunRegistration(const GeometryRegistrationParameters &)
Definition GeometryRegistration.h:51
const TranslatedString & registrationName() const
Definition GeometryRegistration.h:54
String m_id
Definition GeometryRegistration.h:58
GeometryRegistration(const GeometryRegistration &&filter)=delete
virtual ~GeometryRegistration()=default
TranslatedString m_name
Definition GeometryRegistration.h:57
GeometryRegistration(const GeometryRegistration &filter)=delete
virtual bool runRegistration(GeometryRegistrationParameters &parameters)=0
static Dictionary< String, GeometryRegistration * > s_global_available_registration_engines
Definition GeometryRegistration.h:63
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
Definition JSONParser.h:121
Definition Matrix.hpp:173
Definition ProgressInfo.hpp:43
Definition String.h:40
Definition TranslatedString.h:9
Definition UUID.h:66
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:120
Definition GeometryRegistration.h:15
Definition GeometryRegistration.h:19
Matrix< fltp08 > reference_transform
Definition GeometryRegistration.h:24
Buffer< Matrix< fltp08 > > potential_a_to_b_transform
Definition GeometryRegistration.h:21
Buffer< GeometryVertices > registration_points
Definition GeometryRegistration.h:26
std::function< void(uint04 iteration_a, uint04 iteration_b, Matrix< fltp08 > &mat, bool finished)> update_data_callback
Definition GeometryRegistration.h:28
GeometryVertices reference
Definition GeometryRegistration.h:25
Buffer< Matrix< fltp08 > > original_transforms
Definition GeometryRegistration.h:27
Definition GeometryVertices.h:14