2d/vectorfield.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_2d_2dvectorfield_hh
#define mia_2d_2dvectorfield_hh
#include <mia/core/attributes.hh>
#include <mia/2d/datafield.hh>
NS_MIA_BEGIN
template <typename T>
class EXPORT_2D T2DVectorfield: public T2DDatafield<T>, public CAttributedData
{
public:
static const char *data_descr;
T2DVectorfield();
T2DVectorfield(const C2DBounds& size);
T2DVectorfield(const CAttributedData& data, const C2DBounds& size);
C2DFVector get_pixel_size() const;
void set_pixel_size(const C2DFVector& pixel);
T get_interpol_val_at(const C2DFVector& p) const;
};
extern template class EXPORT_2D T2DVectorfield<C2DFVector>;
extern template class EXPORT_2D T2DVectorfield<C2DDVector>;
class EXPORT_2D C2DFVectorfield : public T2DVectorfield<C2DFVector>
{
public:
using T2DVectorfield<C2DFVector>::T2DVectorfield;
void update_as_inverse_of(const C2DFVectorfield& other, float tol, int maxiter);
void update_by_velocity(const C2DFVectorfield& velocity_field, float time_step);
};
typedef std::shared_ptr<C2DFVectorfield > P2DFVectorfield;
typedef T2DVectorfield<C2DDVector> C2DDVectorfield;
EXPORT_2D C2DFVectorfield& operator += (C2DFVectorfield& a, const C2DFVectorfield& b);
NS_MIA_END
#endif
datafield.hh
C2DBounds
T2DVector< unsigned int > C2DBounds
unsigned int valued 2D vector - used as 2D size parameter
Definition 2d/vector.hh:540
C2DFVector
T2DVector< float > C2DFVector
float valued 2D vector
Definition 2d/vector.hh:534
operator+=
EXPORT_2D C2DFVectorfield & operator+=(C2DFVectorfield &a, const C2DFVectorfield &b)
P2DFVectorfield
std::shared_ptr< C2DFVectorfield > P2DFVectorfield
Definition 2d/vectorfield.hh:107
C2DDVectorfield
T2DVectorfield< C2DDVector > C2DDVectorfield
2D vector field to store double precicion 2D vectors
Definition 2d/vectorfield.hh:110
attributes.hh
C2DFVectorfield
a 2D field of floating point single accuracy 2D vectors
Definition 2d/vectorfield.hh:80
C2DFVectorfield::update_as_inverse_of
void update_as_inverse_of(const C2DFVectorfield &other, float tol, int maxiter)
evaluate this vector field as the inverse of another
C2DFVectorfield::update_by_velocity
void update_by_velocity(const C2DFVectorfield &velocity_field, float time_step)
CAttributedData::CAttributedData
CAttributedData()
T2DDatafield::T2DDatafield
T2DDatafield()
T2DDatafield::size
size_type size() const
T2DVectorfield
2D Vector field
Definition 2d/vectorfield.hh:38
T2DVectorfield::get_pixel_size
C2DFVector get_pixel_size() const
T2DVectorfield::T2DVectorfield
T2DVectorfield(const CAttributedData &data, const C2DBounds &size)
T2DVectorfield::T2DVectorfield
T2DVectorfield(const C2DBounds &size)
T2DVectorfield< C2DDVector >::data_descr
static const char * data_descr
Definition 2d/vectorfield.hh:41
T2DVectorfield::T2DVectorfield
T2DVectorfield()
T2DVectorfield::set_pixel_size
void set_pixel_size(const C2DFVector &pixel)
T2DVectorfield::get_interpol_val_at
T get_interpol_val_at(const C2DFVector &p) const
This function should really go away.
EXPORT_2D
#define EXPORT_2D
Definition defines2d.hh:37
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36