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 public:
42  static const char *data_descr;
44  typedef std::shared_ptr<CSegSetWithImages> Pointer;
45 
47 
48  CSegSetWithImages(int version);
49 
50 
57  CSegSetWithImages(const CXMLDocument& node, const std::string& fileroot);
58 
59 
66  CSegSetWithImages(const std::string& filename, bool ignore_path);
67 
69  const C2DImageSeries& get_images()const;
70 
72  void set_images(const C2DImageSeries& series);
73 
75  void save_images(const std::string& root) const;
76 
77 
78  using CSegSet::add_frame;
84  void add_frame(const CSegFrame& frame, P2DImage image);
85 
92  CSegSetWithImages crop(const C2DIVector& start, const C2DIVector& end,
93  const std::string& crop_filename_base);
94 
95  CSegSetWithImages *clone() const;
96 private:
97  C2DImageSeries m_images;
98 };
99 
101 
103 extern template class EXPORT_2DMYOCARD TIOPlugin<CSegSetWithImages>;
104 
107 
108 template <>
111 };
112 
113 
114 
116 
117 #endif
the singleton that a plug-in handler really is
Definition: handler.hh:157
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition: 2d/image.hh:119
static const char * data_descr
void add_frame(const CSegFrame &frame)
TIOPlugin< CSegSetWithImages > CSegSetWithImagesIOPlugin
a 2D vector
Definition: 2d/vector.hh:46
The templatex basis class of all IO plug-ins.
Definition: ioplugin.hh:57
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
facate for an XML document
CSegSetWithImages::Pointer PSegSetWithImages
#define EXPORT_2D
Definition: defines2d.hh:37
A set of segmentation of a 2D series of perfusion images.
Definition: segset.hh:40
THandlerSingleton< TIOPluginHandler< CSegSetWithImagesIOPlugin > > CSegSetWithImagesIOPluginHandler
CSegSetWithImagesIOPluginHandler type
This class implements a facade for the xml Element.
Definition: xmlinterface.hh:49
CSegSetWithImages type
A class to represent one segmented frame in a heart perfusion series.
Definition: segframe.hh:39
std::vector< P2DImage > C2DImageSeries
helper type for image series
Definition: 2d/image.hh:122
std::shared_ptr< CSegSetWithImages > Pointer
A set of images and its segmentations, related to heart perfusion analysis.
The generic base for all plug-ins.
Definition: plugin_base.hh:170
#define EXPORT_2DMYOCARD
Definition: defines2d.hh:53
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36