My Project
segsetwithimages.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 mia_2d_SegSetWithImages_hh
22 #define mia_2d_SegSetWithImages_hh
23 
24 
25 #include <mia/core/iohandler.hh>
26 
27 #include <mia/2d/segset.hh>
28 #include <mia/2d/image.hh>
29 
31 
32 class CXMLElement;
33 class CXMLDocument;
41 {
42 public:
43  static const char *data_descr;
45  typedef std::shared_ptr<CSegSetWithImages> Pointer;
46 
48 
49  CSegSetWithImages(int version);
50 
51 
58  CSegSetWithImages(const CXMLDocument& node, const std::string& fileroot);
59 
60 
67  CSegSetWithImages(const std::string& filename, bool ignore_path);
68 
70  const C2DImageSeries& get_images()const;
71 
73  void set_images(const C2DImageSeries& series);
74 
76  void save_images(const std::string& root) const;
77 
78 
79  using CSegSet::add_frame;
85  void add_frame(const CSegFrame& frame, P2DImage image);
86 
93  CSegSetWithImages crop(const C2DIVector& start, const C2DIVector& end,
94  const std::string& crop_filename_base);
95 
96  CSegSetWithImages *clone() const;
97 private:
98  C2DImageSeries m_images;
99 };
100 
102 
104 extern template class EXPORT_2DMYOCARD TIOPlugin<CSegSetWithImages>;
105 
108 
109 template <>
112 };
113 
114 
115 
117 
118 #endif
CSegSetWithImages::Pointer
std::shared_ptr< CSegSetWithImages > Pointer
Definition: segsetwithimages.hh:45
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
PSegSetWithImages
CSegSetWithImages::Pointer PSegSetWithImages
Definition: segsetwithimages.hh:101
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
THandlerSingleton
the singleton that a plug-in handler really is
Definition: handler.hh:158
CSegSetWithImages::data_descr
static const char * data_descr
Definition: segsetwithimages.hh:43
CXMLElement
This class implements a facade for the xml Element.
Definition: xmlinterface.hh:49
P2DImage
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition: 2d/image.hh:120
T2DVector
a 2D vector
Definition: 2d/vector.hh:46
iohandler.hh
CXMLDocument
facate for an XML document
Definition: xmlinterface.hh:136
EXPORT_2DMYOCARD
#define EXPORT_2DMYOCARD
Definition: defines2d.hh:53
TIOPlugin
The templatex basis class of all IO plug-ins.
Definition: ioplugin.hh:57
TPlugin
The generic base for all plug-ins.
Definition: plugin_base.hh:171
segset.hh
IOHandler_of
Definition: iohandler.hh:185
IOHandler_of< CSegSetWithImages >::type
CSegSetWithImagesIOPluginHandler type
Definition: segsetwithimages.hh:111
CSegSetWithImagesIOPluginHandler
THandlerSingleton< TIOPluginHandler< CSegSetWithImagesIOPlugin > > CSegSetWithImagesIOPluginHandler
Definition: segsetwithimages.hh:107
CSegSetWithImages::type
CSegSetWithImages type
Definition: segsetwithimages.hh:44
CSegSet
A set of segmentation of a 2D series of perfusion images.
Definition: segset.hh:40
CSegSetWithImagesIOPlugin
TIOPlugin< CSegSetWithImages > CSegSetWithImagesIOPlugin
Definition: segsetwithimages.hh:106
C2DImageSeries
std::vector< P2DImage > C2DImageSeries
helper type for image series
Definition: 2d/image.hh:123
CSegFrame
A class to represent one segmented frame in a heart perfusion series.
Definition: segframe.hh:39
CSegSetWithImages
A set of images and its segmentations, related to heart perfusion analysis.
Definition: segsetwithimages.hh:40
image.hh
EXPORT_2D
#define EXPORT_2D
Definition: defines2d.hh:37
CSegSet::add_frame
void add_frame(const CSegFrame &frame)