vcsl_matrix.h
Go to the documentation of this file.
1 // This is core/vcsl/vcsl_matrix.h
2 #ifndef vcsl_matrix_h_
3 #define vcsl_matrix_h_
4 //:
5 // \file
6 // \brief A coordinate transformation specified by a transformation matrix
7 // \author Francois BERTEL
8 //
9 // \verbatim
10 // Modifications
11 // 2000/07/19 Francois BERTEL Creation.
12 // 2002/01/22 Peter Vanroose - return type of execute() and inverse() changed to non-ptr
13 // 2002/01/28 Peter Vanroose - std::vector member matrix_ changed to non-ptr
14 // 2002/12/30 Peter Vanroose - removed unused and commented out member _vector
15 // 2004/09/17 Peter Vanroose - made matrix_list() non-virtual - it just returns a member and should not be overloaded
16 // \endverbatim
17 
19 #include <vcsl/vcsl_matrix_sptr.h>
20 #include <vcsl/vcsl_matrix_param.h>
21 #include <vnl/vnl_vector.h>
22 #include <vnl/vnl_matrix.h>
23 
24 //: A coordinate transformation specified by a transformation matrix
27 {
28  public:
29  //***************************************************************************
30  // Constructors/Destructor
31  //***************************************************************************
32 
33  // Default constructor
34  vcsl_matrix() = default;
35 
36  // Destructor
37  ~vcsl_matrix() override = default;
38 
39  //***************************************************************************
40  // Status report
41  //***************************************************************************
42 
43  //: Is `this' invertible at time `time'?
44  // REQUIRE: valid_time(time)
45  // Pure virtual function of vcsl_spatial_transformation
46  bool is_invertible(double time) const override;
47 
48  //: Is `this' correctly set ?
49  // Virtual function of vcsl_spatial_transformation
50  bool is_valid() const override
51  { return vcsl_spatial_transformation::is_valid() && this->duration()==matrix_.size(); }
52 
53  //***************************************************************************
54  // Transformation parameters
55  //***************************************************************************
56 
57  //: Set the parameters of a static translation
58  void set_static( const vcsl_matrix_param_sptr& new_matrix);
59 
60  //: Set the direction vector variation along the time
62 
64 
65  // Pure virtual function of vcsl_spatial_transformation
67  double time) const override;
68 
69  // Pure virtual function of vcsl_spatial_transformation
71  double time) const override;
72 
73  protected:
74  vnl_matrix<double> param_to_matrix(const vcsl_matrix_param_sptr& from,bool type) const;
75  vnl_matrix<double> matrix_value(double time, bool type) const;
77 };
78 
79 #endif // vcsl_matrix_h_
unsigned int duration() const
Return the time duration.
list_of_vcsl_matrix_param_sptr matrix_list() const
Definition: vcsl_matrix.h:63
Transformation between 2 spatial coordinate systems.
Transformation between 2 spatial coordinate systems.
void set_matrix(list_of_vcsl_matrix_param_sptr const &m)
Set the direction vector variation along the time.
Definition: vcsl_matrix.h:61
#define m
std::vector< vcsl_matrix_param_sptr > list_of_vcsl_matrix_param_sptr
vnl_vector< double > execute(const vnl_vector< double > &v, double time) const override
Image of ‘v’ by ‘this’.
Definition: vcsl_matrix.cxx:35
void set_static()
Empty the time clock and interpolators, thereby making the transf static.
vnl_vector< double > inverse(const vnl_vector< double > &v, double time) const override
Image of ‘v’ by the inverse of ‘this’.
Definition: vcsl_matrix.cxx:53
bool is_invertible(double time) const override
Is ‘this’ invertible at time ‘time’?.
Definition: vcsl_matrix.cxx:14
virtual bool is_valid() const
Is ‘this’ correctly set ?.
vnl_matrix< double > param_to_matrix(const vcsl_matrix_param_sptr &from, bool type) const
Definition: vcsl_matrix.cxx:95
Auxiliary class for vcsl_matrix.
bool is_valid() const override
Is ‘this’ correctly set ?.
Definition: vcsl_matrix.h:50
A coordinate transformation specified by a transformation matrix.
Definition: vcsl_matrix.h:25
list_of_vcsl_matrix_param_sptr matrix_
Definition: vcsl_matrix.h:76
~vcsl_matrix() override=default
vnl_matrix< double > matrix_value(double time, bool type) const
Definition: vcsl_matrix.cxx:69
vcsl_matrix()=default