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-2016 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 
30 namespace xmlpp {
31  class Document;
32 };
33 
35 
43 public:
44  static const char *data_descr;
46  typedef std::shared_ptr<CSegSetWithImages> Pointer;
47 
49 
50  CSegSetWithImages(int version);
51 
52 
59  CSegSetWithImages(const xmlpp::Document& node, const std::string& fileroot);
60 
61 
68  CSegSetWithImages(const std::string& filename, bool ignore_path);
69 
71  const C2DImageSeries& get_images()const;
72 
74  void set_images(const C2DImageSeries& series);
75 
77  void save_images(const std::string& root) const;
78 
79 
80  using CSegSet::add_frame;
86  void add_frame(const CSegFrame& frame, P2DImage image);
87 
94  CSegSetWithImages crop(const C2DIVector& start, const C2DIVector& end,
95  const std::string& crop_filename_base);
96 
97  CSegSetWithImages *clone() const;
98 private:
99  C2DImageSeries m_images;
100 };
101 
103 
105 extern template class EXPORT_2DMYOCARD TIOPlugin<CSegSetWithImages>;
106 
109 
110 template <>
113 };
114 
115 
116 
118 
119 #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:110
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
CSegSetWithImages::Pointer PSegSetWithImages
#define EXPORT_2D
Definition: defines2d.hh:37
A set of segmentation of a 2D series of perfusion images.
Definition: segset.hh:41
THandlerSingleton< TIOPluginHandler< CSegSetWithImagesIOPlugin > > CSegSetWithImagesIOPluginHandler
CSegSetWithImagesIOPluginHandler type
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:113
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