segsetwithimages.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_2d_SegSetWithImages_hh
#define mia_2d_SegSetWithImages_hh
#include <mia/core/iohandler.hh>
#include <mia/2d/segset.hh>
#include <mia/2d/image.hh>
NS_MIA_BEGIN
class CXMLElement;
class CXMLDocument;
class EXPORT_2D CSegSetWithImages: public CSegSet
{
public:
static const char *data_descr;
typedef CSegSetWithImages type;
typedef std::shared_ptr<CSegSetWithImages> Pointer;
CSegSetWithImages();
CSegSetWithImages(int version);
CSegSetWithImages(const CXMLDocument& node, const std::string& fileroot);
CSegSetWithImages(const std::string& filename, bool ignore_path);
const C2DImageSeries& get_images()const;
void set_images(const C2DImageSeries& series);
void save_images(const std::string& root) const;
using CSegSet::add_frame;
void add_frame(const CSegFrame& frame, P2DImage image);
CSegSetWithImages crop(const C2DIVector& start, const C2DIVector& end,
const std::string& crop_filename_base);
CSegSetWithImages *clone() const;
private:
C2DImageSeries m_images;
};
typedef CSegSetWithImages::Pointer PSegSetWithImages;
extern template class EXPORT_2DMYOCARD TPlugin<CSegSetWithImages, io_plugin_type>;
extern template class EXPORT_2DMYOCARD TIOPlugin<CSegSetWithImages>;
typedef TIOPlugin<CSegSetWithImages> CSegSetWithImagesIOPlugin;
typedef THandlerSingleton< TIOPluginHandler<CSegSetWithImagesIOPlugin >> CSegSetWithImagesIOPluginHandler;
template <>
struct IOHandler_of<CSegSetWithImages> {
typedef CSegSetWithImagesIOPluginHandler type;
};
NS_MIA_END
#endif
image.hh
P2DImage
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition 2d/image.hh:120
C2DImageSeries
std::vector< P2DImage > C2DImageSeries
helper type for image series
Definition 2d/image.hh:123
C2DIVector
T2DVector< int > C2DIVector
a 2D int vector
Definition boundingbox.hh:31
CSegFrame
A class to represent one segmented frame in a heart perfusion series.
Definition segframe.hh:40
CSegSetWithImages
A set of images and its segmentations, related to heart perfusion analysis.
Definition segsetwithimages.hh:41
CSegSetWithImages::CSegSetWithImages
CSegSetWithImages(const CXMLDocument &node, const std::string &fileroot)
CSegSetWithImages::clone
CSegSetWithImages * clone() const
CSegSetWithImages::crop
CSegSetWithImages crop(const C2DIVector &start, const C2DIVector &end, const std::string &crop_filename_base)
CSegSetWithImages::data_descr
static const char * data_descr
Definition segsetwithimages.hh:43
CSegSetWithImages::Pointer
std::shared_ptr< CSegSetWithImages > Pointer
Definition segsetwithimages.hh:45
CSegSetWithImages::set_images
void set_images(const C2DImageSeries &series)
sets the image series
CSegSetWithImages::CSegSetWithImages
CSegSetWithImages(int version)
CSegSetWithImages::type
CSegSetWithImages type
Definition segsetwithimages.hh:44
CSegSetWithImages::get_images
const C2DImageSeries & get_images() const
CSegSetWithImages::CSegSetWithImages
CSegSetWithImages()
CSegSetWithImages::add_frame
void add_frame(const CSegFrame &frame, P2DImage image)
CSegSetWithImages::save_images
void save_images(const std::string &root) const
save the images to their give file names with the given directory as root
CSegSetWithImages::CSegSetWithImages
CSegSetWithImages(const std::string &filename, bool ignore_path)
CSegSet::add_frame
void add_frame(const CSegFrame &frame)
CSegSet::CSegSet
CSegSet()
Standard constructor.
CXMLDocument
facate for an XML document
Definition xmlinterface.hh:137
CXMLElement
This class implements a facade for the xml Element.
Definition xmlinterface.hh:50
THandlerSingleton
the singleton that a plug-in handler really is
Definition handler.hh:159
TIOPlugin
The templatex basis class of all IO plug-ins.
Definition ioplugin.hh:58
TPlugin
The generic base for all plug-ins.
Definition plugin_base.hh:172
EXPORT_2DMYOCARD
#define EXPORT_2DMYOCARD
Definition defines2d.hh:53
EXPORT_2D
#define EXPORT_2D
Definition defines2d.hh:37
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
iohandler.hh
segset.hh
CSegSetWithImagesIOPlugin
TIOPlugin< CSegSetWithImages > CSegSetWithImagesIOPlugin
Definition segsetwithimages.hh:106
PSegSetWithImages
CSegSetWithImages::Pointer PSegSetWithImages
Definition segsetwithimages.hh:101
CSegSetWithImagesIOPluginHandler
THandlerSingleton< TIOPluginHandler< CSegSetWithImagesIOPlugin > > CSegSetWithImagesIOPluginHandler
Definition segsetwithimages.hh:107
IOHandler_of< CSegSetWithImages >::type
CSegSetWithImagesIOPluginHandler type
Definition segsetwithimages.hh:111
IOHandler_of
Definition iohandler.hh:185