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 public:
43  typedef std::vector<CSegFrame> Frames;
44 
46  CSegSet();
51  CSegSet(const std::string& src_filename);
52 
57  CSegSet(const CXMLDocument& node);
58 
59 
60  CSegSet(int version);
65  void add_frame(const CSegFrame& frame);
66 
71  CXMLDocument write() const;
72 
73 
75  const Frames& get_frames()const;
76 
81  Frames& get_frames();
82 
86  const C2DBoundingBox get_boundingbox() const;
87 
92  void rename_base(const std::string& new_base);
93 
94 
103  CSegSet shift_and_rename(size_t skip, const C2DFVector& shift, const std::string& new_filename_base)const;
104 
110  void transform(const C2DTransformation& t);
111 
112 
117  void set_RV_peak(int peak);
118 
122  int get_RV_peak() const;
123 
128  void set_LV_peak(int peak);
129 
133  int get_LV_peak() const;
134 
140  int get_preferred_reference() const;
141 
142 
147  void set_preferred_reference(int value);
148 
149 private:
150  void read(const CXMLDocument& node);
151  Frames m_frames;
152  int m_RV_peak;
153  int m_LV_peak;
154  int m_preferred_reference;
155  int m_version;
156 };
157 
158 
160 
161 #endif
std::vector< CSegFrame > Frames
convenience typedef for the frames comprising a segmentation set
Definition: segset.hh:43
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
facate for an XML document
#define EXPORT_2D
Definition: defines2d.hh:37
A set of segmentation of a 2D series of perfusion images.
Definition: segset.hh:40
This is the generic base class for 2D transformations.
Definition: 2d/transform.hh:45
helper class to derive from for data that can be loaded and stored to a disk.
Definition: iodata.hh:36
2D axis orthothogonal bounding box.
Definition: boundingbox.hh:38
A class to represent one segmented frame in a heart perfusion series.
Definition: segframe.hh:39
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36