landmark.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_3d_landmarks_hh
#define mia_3d_landmarks_hh
#include <memory>
#include <vector>
#include <mia/3d/defines3d.hh>
#include <mia/3d/camera.hh>
#include <mia/2d/image.hh>
namespace boost
{
namespace filesystem
{
class path;
}
}
NS_MIA_BEGIN
class EXPORT_3D C3DLandmark
{
public:
typedef std::shared_ptr<C3DLandmark> Pointer;
C3DLandmark(const std::string& name, const C3DFVector& location);
C3DLandmark(const std::string& name);
C3DLandmark(const C3DLandmark& other) = default;
const std::string& get_name() const;
const C3DFVector& get_location() const;
const C3DCamera& get_view() const;
const std::string& get_picture_file()const;
P2DImage get_picture(const boost::filesystem::path& root_path) const;
float get_isovalue()const;
void set_location(const C3DFVector& pos);
void set_view(const C3DCamera& view);
void set_picture_file(const std::string& picfile);
void set_isovalue(float value);
bool has_location()const;
void print(std::ostream& os)const;
private:
// required attributes
std::string m_name;
bool m_has_location;
C3DFVector m_location;
// additional attributes
std::string m_picfile;
float m_isovalue;
C3DCamera m_view;
mutable P2DImage m_picture;
};
bool EXPORT_3D operator == (const C3DLandmark& a, const C3DLandmark& b);
inline
std::ostream& operator << (std::ostream& os, const C3DLandmark& lm)
{
lm.print(os);
return os;
}
typedef C3DLandmark::Pointer P3DLandmark;
NS_MIA_END
#endif
image.hh
P2DImage
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition 2d/image.hh:120
C3DFVector
T3DVector< float > C3DFVector
A float 3D Vector.
Definition 3d/vector.hh:409
camera.hh
C3DCamera
this class defines the view point for 3D visualization
Definition camera.hh:35
C3DLandmark
a named 3D landmark
Definition landmark.hh:48
C3DLandmark::get_name
const std::string & get_name() const
C3DLandmark::print
void print(std::ostream &os) const
C3DLandmark::C3DLandmark
C3DLandmark(const C3DLandmark &other)=default
Standard copy constructor.
C3DLandmark::get_picture_file
const std::string & get_picture_file() const
C3DLandmark::C3DLandmark
C3DLandmark(const std::string &name)
C3DLandmark::get_picture
P2DImage get_picture(const boost::filesystem::path &root_path) const
C3DLandmark::set_picture_file
void set_picture_file(const std::string &picfile)
C3DLandmark::Pointer
std::shared_ptr< C3DLandmark > Pointer
Shared pointer type of the landmark.
Definition landmark.hh:52
C3DLandmark::get_location
const C3DFVector & get_location() const
C3DLandmark::has_location
bool has_location() const
C3DLandmark::set_location
void set_location(const C3DFVector &pos)
C3DLandmark::get_isovalue
float get_isovalue() const
C3DLandmark::C3DLandmark
C3DLandmark(const std::string &name, const C3DFVector &location)
C3DLandmark::get_view
const C3DCamera & get_view() const
C3DLandmark::set_view
void set_view(const C3DCamera &view)
C3DLandmark::set_isovalue
void set_isovalue(float value)
defines3d.hh
EXPORT_3D
#define EXPORT_3D
Definition defines3d.hh:45
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
P3DLandmark
C3DLandmark::Pointer P3DLandmark
Definition landmark.hh:151
operator==
bool EXPORT_3D operator==(const C3DLandmark &a, const C3DLandmark &b)
operator<<
std::ostream & operator<<(std::ostream &os, const C3DLandmark &lm)
Definition landmark.hh:145
boost::filesystem
Definition filetools.hh:32
boost
Definition filetools.hh:30