DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CImageFactory.h
1
16
17
#pragma once
18
30
31
#if defined(CImageFactory_RECURSES)
32
#error Recursive header files inclusion detected in CImageFactory.h
33
#else
// defined(CImageFactory_RECURSES)
35
#define CImageFactory_RECURSES
36
37
#if !defined CImageFactory_h
39
#define CImageFactory_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
46
47
namespace
DGtal
48
{
49
namespace
concepts
50
{
52
// class CImageFactory
89
template
<
typename
T>
90
struct
CImageFactory
91
{
92
// ----------------------- Concept checks ------------------------------
93
public
:
94
95
typedef
typename
T::OutputImage
OutputImage
;
96
97
BOOST_CONCEPT_ASSERT
((
CImage< OutputImage >
));
98
99
BOOST_CONCEPT_USAGE
(
CImageFactory
)
100
{
101
ConceptUtils::sameType
(
myOI
,
myT
.requestImage(
myDomain
) );
102
myT
.flushImage(
myOI
);
103
myT
.detachImage(
myOI
);
104
105
// check const methods.
106
checkConstConstraints
();
107
}
108
void
checkConstConstraints
()
const
109
{
110
}
111
112
// ------------------------- Private Data --------------------------------
113
private
:
114
T
myT
;
// do not require T to be default constructible.
115
OutputImage
*
myOI
;
116
typename
T::Domain
myDomain
;
117
118
// ------------------------- Internals ------------------------------------
119
private
:
120
121
};
// end of concept CImageFactory
122
}
123
}
// namespace DGtal
124
125
// //
127
128
#endif
// !defined CImageFactory_h
129
130
#undef CImageFactory_RECURSES
131
#endif
// else defined(CImageFactory_RECURSES)
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CImageFactory
Aim: Defines the concept describing an image factory.
Definition
CImageFactory.h:91
DGtal::concepts::CImageFactory::OutputImage
T::OutputImage OutputImage
Definition
CImageFactory.h:95
DGtal::concepts::CImageFactory::myDomain
T::Domain myDomain
Definition
CImageFactory.h:116
DGtal::concepts::CImageFactory::checkConstConstraints
void checkConstConstraints() const
Definition
CImageFactory.h:108
DGtal::concepts::CImageFactory::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CImageFactory)
Definition
CImageFactory.h:99
DGtal::concepts::CImageFactory::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CImage< OutputImage >))
DGtal::concepts::CImageFactory::myT
T myT
Definition
CImageFactory.h:114
DGtal::concepts::CImageFactory::myOI
OutputImage * myOI
Definition
CImageFactory.h:115
DGtal::concepts::CImage
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition
CImage.h:103
src
DGtal
images
CImageFactory.h
Generated on
for DGtal by
1.18.0