30 #define __attribute__(x) 37 #include "boost/serialization/shared_ptr.hpp" 38 #include "boost/serialization/binary_object.hpp" 39 #include "boost/serialization/nvp.hpp" 40 #include <boost/archive/binary_oarchive.hpp> 41 #include <boost/archive/binary_iarchive.hpp> 50 LOG_LOGGER _log =
LOG_GET(
"afw.DecoratedImageFormatter");
53 using boost::serialization::make_nvp;
63 namespace formatters {
65 template <
typename ImagePixelT>
97 template <
typename ImagePixelT>
102 template <
typename ImagePixelT>
106 template <
typename ImagePixelT>
109 template <
typename ImagePixelT>
113 LOGL_DEBUG(_log,
"DecoratedImageFormatter write start");
122 LOGL_DEBUG(_log,
"DecoratedImageFormatter write BoostStorage");
123 boost->getOArchive() & *ip;
124 LOGL_DEBUG(_log,
"DecoratedImageFormatter write end");
129 LOGL_DEBUG(_log,
"DecoratedImageFormatter write XmlStorage");
130 xml->getOArchive() & make_nvp(
"img", *ip);
131 LOGL_DEBUG(_log,
"DecoratedImageFormatter write end");
136 LOGL_DEBUG(_log,
"DecoratedImageFormatter write FitsStorage");
142 LOGL_DEBUG(_log,
"DecoratedImageFormatter write end");
146 "Unrecognized FormatterStorage for DecoratedImage");
149 template <
typename ImagePixelT>
152 LOGL_DEBUG(_log,
"DecoratedImageFormatter read start");
156 LOGL_DEBUG(_log,
"DecoratedImageFormatter read BoostStorage");
158 boost->getIArchive() & *ip;
159 LOGL_DEBUG(_log,
"DecoratedImageFormatter read end");
164 LOGL_DEBUG(_log,
"DecoratedImageFormatter read XmlStorage");
166 boost->getIArchive() & make_nvp(
"img", *ip);
167 LOGL_DEBUG(_log,
"DecoratedImageFormatter read end");
172 LOGL_DEBUG(_log,
"DecoratedImageFormatter read FitsStorage");
178 LOGL_DEBUG(_log,
"DecoratedImageFormatter read end");
182 "Unrecognized FormatterStorage for DecoratedImage");
185 template <
typename ImagePixelT>
192 template <
typename ImagePixelT>
193 template <
class Archive>
195 LOGL_DEBUG(_log,
"DecoratedImageFormatter delegateSerialize start");
201 "DecoratedImage serialization not yet implemented");
204 template <
typename ImagePixelT>
211 #define InstantiateFormatter(ImagePixelT) \ 212 template class DecoratedImageFormatter<ImagePixelT>; \ 213 template void DecoratedImageFormatter<ImagePixelT>::delegateSerialize(boost::archive::text_oarchive&, \ 214 int const, Persistable*); \ 215 template void DecoratedImageFormatter<ImagePixelT>::delegateSerialize(boost::archive::text_iarchive&, \ 216 int const, Persistable*); \ 217 template void DecoratedImageFormatter<ImagePixelT>::delegateSerialize(boost::archive::binary_oarchive&, \ 218 int const, Persistable*); \ 219 template void DecoratedImageFormatter<ImagePixelT>::delegateSerialize(boost::archive::binary_iarchive&, \ 220 int const, Persistable*); 228 #undef InstantiateFormatter
#define LOGL_DEBUG(logger, message...)
A base class for image defects.
void writeFits(std::string const &fileName, std::shared_ptr< lsst::daf::base::PropertySet const > metadata=std::shared_ptr< lsst::daf::base::PropertySet const >(), std::string const &mode="w") const
Write a FITS file.
T dynamic_pointer_cast(T... args)
#define LSST_EXCEPT(type,...)
A container for an Image and its associated metadata.