SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
ModelFitting::RotatedModelComponent Class Reference

#include <RotatedModelComponent.h>

Inheritance diagram for ModelFitting::RotatedModelComponent:
Collaboration diagram for ModelFitting::RotatedModelComponent:

Public Member Functions

 RotatedModelComponent (std::unique_ptr< ModelComponent > component, std::shared_ptr< BasicParameter > rotation_angle)
 RotatedModelComponent (RotatedModelComponent &&other)
virtual ~RotatedModelComponent ()
double getValue (double x, double y) override
void updateRasterizationInfo (double scale, double r_max) override
std::vector< ModelSamplegetSharpSampling () override
bool insideSharpRegion (double x, double y) override
Public Member Functions inherited from ModelFitting::ModelComponent
virtual ~ModelComponent ()=default

Private Attributes

std::unique_ptr< ModelComponentm_component
std::shared_ptr< BasicParameterm_rotation_angle
double m_cos
double m_sin
std::size_t m_observer_id

Additional Inherited Members

Public Types inherited from ModelFitting::ModelComponent
using ModelSample = std::tuple<double, double, double>

Detailed Description

Decorates a model component, rotating the coordinates by the given angle. As there is no scaling, the integrated value remains.

Definition at line 36 of file RotatedModelComponent.h.

Constructor & Destructor Documentation

◆ RotatedModelComponent() [1/2]

ModelFitting::RotatedModelComponent::RotatedModelComponent ( std::unique_ptr< ModelComponent > component,
std::shared_ptr< BasicParameter > rotation_angle )

Constructor

Parameters
componentThe component to be decorated. The ownership is acquired by the new object.
rotation_angleThe rotation angle in radians.
Note
Rotation is done anti-clockwise!

Definition at line 29 of file RotatedModelComponent.cpp.

References std::cos(), getValue(), m_component, m_cos, m_observer_id, m_rotation_angle, m_sin, std::move(), and std::sin().

Referenced by RotatedModelComponent().

Here is the call graph for this function:

◆ RotatedModelComponent() [2/2]

ModelFitting::RotatedModelComponent::RotatedModelComponent ( RotatedModelComponent && other)

Definition at line 41 of file RotatedModelComponent.cpp.

References m_component, m_cos, m_observer_id, m_rotation_angle, m_sin, std::move(), and RotatedModelComponent().

Here is the call graph for this function:

◆ ~RotatedModelComponent()

ModelFitting::RotatedModelComponent::~RotatedModelComponent ( )
virtual

Definition at line 48 of file RotatedModelComponent.cpp.

References m_observer_id, and m_rotation_angle.

Member Function Documentation

◆ getSharpSampling()

auto ModelFitting::RotatedModelComponent::getSharpSampling ( )
overridevirtual

Returns the samples computed only for the sharp area, if any.

The returned value is the integrated value of the function for the area corresponding to the sample, not the value of the function. A pixel may be computed adding up the samples that fall within.

Implements ModelFitting::ModelComponent.

Definition at line 62 of file RotatedModelComponent.cpp.

References m_component, m_cos, and m_sin.

◆ getValue()

double ModelFitting::RotatedModelComponent::getValue ( double x,
double y )
overridevirtual

Returns the value of the point value of the model at the given coordinates.

Implements ModelFitting::ModelComponent.

Definition at line 52 of file RotatedModelComponent.cpp.

References m_component, m_cos, and m_sin.

Referenced by RotatedModelComponent().

◆ insideSharpRegion()

bool ModelFitting::RotatedModelComponent::insideSharpRegion ( double x,
double y )
overridevirtual

Returns true if the coordinates fall inside the sharp region

Implements ModelFitting::ModelComponent.

Definition at line 73 of file RotatedModelComponent.cpp.

References m_component, m_cos, and m_sin.

◆ updateRasterizationInfo()

void ModelFitting::RotatedModelComponent::updateRasterizationInfo ( double scale,
double r_max )
overridevirtual
Parameters
scale
r_max

Implements ModelFitting::ModelComponent.

Definition at line 58 of file RotatedModelComponent.cpp.

References m_component.

Member Data Documentation

◆ m_component

std::unique_ptr<ModelComponent> ModelFitting::RotatedModelComponent::m_component
private

◆ m_cos

double ModelFitting::RotatedModelComponent::m_cos
private

◆ m_observer_id

std::size_t ModelFitting::RotatedModelComponent::m_observer_id
private

◆ m_rotation_angle

std::shared_ptr<BasicParameter> ModelFitting::RotatedModelComponent::m_rotation_angle
private

◆ m_sin

double ModelFitting::RotatedModelComponent::m_sin
private

The documentation for this class was generated from the following files: