SourceXtractorPlusPlus  0.12
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TransformedModel.h
Go to the documentation of this file.
1 
17 /*
18  * TransformedModel.h
19  *
20  * Created on: Jul 6, 2018
21  * Author: mschefer
22  */
23 
24 #ifndef _MODELFITTING_MODELS_TRANSFORMEDMODEL_H_
25 #define _MODELFITTING_MODELS_TRANSFORMEDMODEL_H_
26 
27 
30 
31 namespace ModelFitting {
32 
33 template <typename ImageType>
34 class TransformedModel : public ExtendedModel<ImageType> {
35 
37 
38 public:
39 
42  std::shared_ptr<BasicParameter> rotation_angle, double width, double height,
45  : ExtendedModel<ImageType>(std::move(component_list), x_scale, y_scale, rotation_angle, width, height, x, y)
46  {
47  for (unsigned int i=0; i<m_component_list.size(); i++) {
48  m_component_list[i] = Euclid::make_unique<TransformModelComponent>(std::move(m_component_list[i]), transform);
49  }
50  }
51 
54  std::shared_ptr<BasicParameter> rotation_angle, double width, double height,
56  : ExtendedModel<ImageType>(std::move(component_list), x_scale, y_scale, rotation_angle, width, height, x, y)
57  {
58  auto transform = std::make_tuple(1, 0, 0, 1);
59  for (unsigned int i=0; i<m_component_list.size(); i++) {
60  m_component_list[i] = Euclid::make_unique<TransformModelComponent>(std::move(m_component_list[i]), transform);
61  }
62  }
63 
65 
66  virtual ~TransformedModel() = default;
67 };
68 
69 }
70 
71 #endif /* _MODELFITTING_MODELS_TRANSFORMEDMODEL_H_ */
TransformedModel(std::vector< std::unique_ptr< ModelComponent >> &&component_list, std::shared_ptr< BasicParameter > x_scale, std::shared_ptr< BasicParameter > y_scale, std::shared_ptr< BasicParameter > rotation_angle, double width, double height, std::shared_ptr< BasicParameter > x, std::shared_ptr< BasicParameter > y, std::tuple< double, double, double, double > transform)
T make_tuple(T...args)
std::vector< std::unique_ptr< ModelComponent > > m_component_list
Definition: ExtendedModel.h:65
T move(T...args)
STL class.
STL class.
TransformedModel(std::vector< std::unique_ptr< ModelComponent >> &&component_list, std::shared_ptr< BasicParameter > x_scale, std::shared_ptr< BasicParameter > y_scale, std::shared_ptr< BasicParameter > rotation_angle, double width, double height, std::shared_ptr< BasicParameter > x, std::shared_ptr< BasicParameter > y)
virtual ~TransformedModel()=default
std::pair< double, double > transform(int x, int y, const std::array< double, 4 > &t)