30 #define __attribute__(x) 40 #include <boost/archive/text_oarchive.hpp> 41 #include <boost/archive/text_iarchive.hpp> 42 #include <boost/archive/binary_oarchive.hpp> 43 #include <boost/archive/binary_iarchive.hpp> 44 #include <boost/archive/xml_oarchive.hpp> 45 #include <boost/archive/xml_iarchive.hpp> 46 #include <boost/serialization/nvp.hpp> 47 #include <boost/serialization/vector.hpp> 49 #include <boost/serialization/export.hpp> 100 LOG_LOGGER _log =
LOG_GET(
"afw.math.KernelFormatter");
105 namespace formatters {
111 using boost::serialization::make_nvp;
116 typeid(math::FixedKernel),
119 typeid(math::AnalyticKernel),
122 "DeltaFunctionKernel",
typeid(math::DeltaFunctionKernel), createInstance);
124 "LinearCombinationKernel",
typeid(math::LinearCombinationKernel), createInstance);
126 typeid(math::SeparableKernel),
132 KernelFormatter::KernelFormatter(KernelFormatter
const&) =
default;
133 KernelFormatter::KernelFormatter(KernelFormatter&&) =
default;
134 KernelFormatter& KernelFormatter::operator=(KernelFormatter
const&) =
default;
135 KernelFormatter& KernelFormatter::operator=(KernelFormatter&&) =
default;
137 KernelFormatter::~KernelFormatter() =
default;
142 LOGL_DEBUG(_log,
"KernelFormatter write start");
150 LOGL_DEBUG(_log,
"KernelFormatter write BoostStorage");
151 boost->getOArchive() & kp;
152 LOGL_DEBUG(_log,
"KernelFormatter write end");
157 LOGL_DEBUG(_log,
"KernelFormatter write XmlStorage");
158 xml->getOArchive() & make_nvp(
"ptr", kp);
159 LOGL_DEBUG(_log,
"KernelFormatter write end");
167 LOGL_DEBUG(_log,
"KernelFormatter read start");
172 LOGL_DEBUG(_log,
"KernelFormatter read BoostStorage");
173 boost->getIArchive() & kp;
179 LOGL_DEBUG(_log,
"KernelFormatter read XmlStorage");
180 xml->getIArchive() & make_nvp(
"ptr", kp);
192 template <
class Archive>
194 LOGL_DEBUG(_log,
"KernelFormatter delegateSerialize start");
199 ar& make_nvp(
"base", boost::serialization::base_object<dafBase::Persistable>(*kp));
200 ar& make_nvp(
"width", kp->_width);
201 ar& make_nvp(
"height", kp->_height);
202 ar& make_nvp(
"ctrX", kp->_ctrX);
203 ar& make_nvp(
"ctrY", kp->_ctrY);
204 ar& make_nvp(
"nParams", kp->_nKernelParams);
207 LOGL_DEBUG(_log,
"KernelFormatter delegateSerialize end");
212 template void KernelFormatter::delegateSerialize(boost::archive::text_oarchive& ar,
unsigned int const,
214 template void KernelFormatter::delegateSerialize(boost::archive::text_iarchive& ar,
unsigned int const,
216 template void KernelFormatter::delegateSerialize(boost::archive::xml_oarchive& ar,
unsigned int const,
218 template void KernelFormatter::delegateSerialize(boost::archive::xml_iarchive& ar,
unsigned int const,
220 template void KernelFormatter::delegateSerialize(boost::archive::binary_oarchive& ar,
unsigned int const,
222 template void KernelFormatter::delegateSerialize(boost::archive::binary_iarchive& ar,
unsigned int const,
2-dimensional weighted sum of Chebyshev polynomials of the first kind.
1-dimensional Lanczos function
double Guassian (sum of two Gaussians)
2-dimensional polynomial function with cross terms
1-dimensional weighted sum of Chebyshev polynomials of the first kind.
A kernel described by a pair of functions: func(x, y) = colFunc(x) * rowFunc(y)
2-dimensional integer delta function.
2-dimensional separable Lanczos function
#define LOGL_DEBUG(logger, message...)
a class used in function calls to indicate that no Function2 is being provided
A base class for image defects.
A kernel that is a linear combination of fixed basis kernels.
T dynamic_pointer_cast(T... args)
a class used in function calls to indicate that no Function1 is being provided
#define LSST_EXCEPT(type,...)
std::vector< SpatialFunctionPtr > _spatialFunctionList
A kernel described by a function.
Kernels are used for convolution with MaskedImages and (eventually) Images.
A kernel that has only one non-zero pixel (of value 1)
A kernel created from an Image.
1-dimensional polynomial function.