My Project
segset.hh
Go to the documentation of this file.
1 /* -*- mia-c++ -*-
2  *
3  * This file is part of MIA - a toolbox for medical image analysis
4  * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
5  *
6  * MIA is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef SegSet_h
22 #define SegSet_h
23 
24 #include <mia/core/ioplugin.hh>
25 #include <mia/core/xmlinterface.hh>
26 #include <mia/2d/segframe.hh>
27 #include <mia/2d/boundingbox.hh>
28 
30 
31 
32 
40 class EXPORT_2D CSegSet: public CIOData
41 {
42 public:
44  typedef std::vector<CSegFrame> Frames;
45 
47  CSegSet();
52  CSegSet(const std::string& src_filename);
53 
58  CSegSet(const CXMLDocument& node);
59 
60 
61  CSegSet(int version);
66  void add_frame(const CSegFrame& frame);
67 
72  CXMLDocument write() const;
73 
74 
76  const Frames& get_frames()const;
77 
82  Frames& get_frames();
83 
87  const C2DBoundingBox get_boundingbox() const;
88 
93  void rename_base(const std::string& new_base);
94 
95 
104  CSegSet shift_and_rename(size_t skip, const C2DFVector& shift, const std::string& new_filename_base)const;
105 
111  void transform(const C2DTransformation& t);
112 
113 
118  void set_RV_peak(int peak);
119 
123  int get_RV_peak() const;
124 
129  void set_LV_peak(int peak);
130 
134  int get_LV_peak() const;
135 
141  int get_preferred_reference() const;
142 
143 
148  void set_preferred_reference(int value);
149 
150 private:
151  void read(const CXMLDocument& node);
152  Frames m_frames;
153  int m_RV_peak;
154  int m_LV_peak;
155  int m_preferred_reference;
156  int m_version;
157 };
158 
159 
161 
162 #endif
boundingbox.hh
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
C2DBoundingBox
2D axis orthothogonal bounding box.
Definition: boundingbox.hh:38
xmlinterface.hh
segframe.hh
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
CSegSet::Frames
std::vector< CSegFrame > Frames
convenience typedef for the frames comprising a segmentation set
Definition: segset.hh:44
T2DVector< float >
CXMLDocument
facate for an XML document
Definition: xmlinterface.hh:136
C2DTransformation
This is the generic base class for 2D transformations.
Definition: 2d/transform.hh:45
CIOData
helper class to derive from for data that can be loaded and stored to a disk.
Definition: iodata.hh:36
CSegSet
A set of segmentation of a 2D series of perfusion images.
Definition: segset.hh:40
CSegFrame
A class to represent one segmented frame in a heart perfusion series.
Definition: segframe.hh:39
ioplugin.hh
EXPORT_2D
#define EXPORT_2D
Definition: defines2d.hh:37