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 
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
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition: 2d/image.hh:120
std::vector< P2DImage > C2DImageSeries
helper type for image series
Definition: 2d/image.hh:123
A class to represent one segmented frame in a heart perfusion series.
Definition: segframe.hh:40
A set of images and its segmentations, related to heart perfusion analysis.
CSegSetWithImages(const CXMLDocument &node, const std::string &fileroot)
const C2DImageSeries & get_images() const
CSegSetWithImages crop(const C2DIVector &start, const C2DIVector &end, const std::string &crop_filename_base)
static const char * data_descr
std::shared_ptr< CSegSetWithImages > Pointer
void set_images(const C2DImageSeries &series)
sets the image series
CSegSetWithImages(int version)
CSegSetWithImages type
CSegSetWithImages * clone() const
void add_frame(const CSegFrame &frame, P2DImage image)
void save_images(const std::string &root) const
save the images to their give file names with the given directory as root
CSegSetWithImages(const std::string &filename, bool ignore_path)
A set of segmentation of a 2D series of perfusion images.
Definition: segset.hh:41
void add_frame(const CSegFrame &frame)
facate for an XML document
This class implements a facade for the xml Element.
Definition: xmlinterface.hh:50
a 2D vector
Definition: 2d/vector.hh:47
the singleton that a plug-in handler really is
Definition: handler.hh:159
The templatex basis class of all IO plug-ins.
Definition: ioplugin.hh:58
The generic base for all plug-ins.
Definition: plugin_base.hh:172
#define EXPORT_2DMYOCARD
Definition: defines2d.hh:53
#define EXPORT_2D
Definition: defines2d.hh:37
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
TIOPlugin< CSegSetWithImages > CSegSetWithImagesIOPlugin
CSegSetWithImages::Pointer PSegSetWithImages
THandlerSingleton< TIOPluginHandler< CSegSetWithImagesIOPlugin > > CSegSetWithImagesIOPluginHandler
CSegSetWithImagesIOPluginHandler type