SourceXtractorPlusPlus  0.14
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageInterfaceTraits.h
Go to the documentation of this file.
1 
17 /*
18  * ImageInterfaceTraits.h
19  *
20  * Created on: May 3, 2017
21  * Author: mschefer
22  */
23 
24 #ifndef _SEIMPLEMENTATION_IMAGE_IMAGEINTERFACETRAITS_H_
25 #define _SEIMPLEMENTATION_IMAGE_IMAGEINTERFACETRAITS_H_
26 
27 #define INTERP_MAXKERNELWIDTH 8 // Max. range of kernel (pixels)
28 
29 #include <boost/math/constants/constants.hpp>
30 #include <cmath>
31 #include <algorithm>
32 #include <memory>
33 #include <utility>
34 #include <vector>
35 
39 
40 #ifdef __APPLE__
41 #define sincosf __sincosf
42 #endif
43 
44 namespace ModelFitting {
45 
46 // Interpolation types
49 
54 
55 template <>
57 
59 
62  }
63 
64  static std::size_t width(const ImageInterfaceTypePtr& image) {
65  return image->getWidth();
66  }
67 
68  static std::size_t height(const ImageInterfaceTypePtr& image) {
69  return image->getHeight();
70  }
71 
73  return image->at(x, y);
74  }
75 
77  return image->at(x, y);
78  }
79 
80  static iterator begin(const ImageInterfaceTypePtr& image) {
81  return image->getData().begin();
82  }
83 
84  static iterator end(const ImageInterfaceTypePtr& image) {
85  return image->getData().end();
86  }
87 
88  static void addImageToImage(ImageInterfaceTypePtr& target_image, const ImageInterfaceTypePtr& source_image,
89  double scale_factor, double x, double y);
90 }; // end of class ImageTraits<ImageInterfaceTypePtr>
91 
92 } // end of namespace ModelFitting
93 
94 namespace SourceXtractor {
95 
96 // Make those types available to the SExtractor namespace for convenience
101 
102 // Interpolation types
105 
106 float interpolate_pix(float *pix, float x, float y,
107  int xsize, int ysize, interpenum interptype);
108 
109 } // end of namespace SExtractor
110 
111 #endif /* _SEIMPLEMENTATION_IMAGE_IMAGEINTERFACETRAITS_H_ */
SourceXtractor::WriteableImage< SourceXtractor::SeFloat > WriteableInterfaceType
static std::size_t height(const ImageInterfaceTypePtr &image)
static std::size_t height(ImageType &image)
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
static void addImageToImage(ImageType &image1, const ImageType &image2, double scale, double x, double y)
static std::shared_ptr< VectorImage< T > > create(Args &&...args)
Definition: VectorImage.h:89
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
static ImageInterfaceType::PixelType & at(ImageInterfaceTypePtr &image, std::size_t x, std::size_t y)
Image implementation which keeps the pixel values in memory.
Definition: VectorImage.h:53
static iterator end(const ImageInterfaceTypePtr &image)
static ImageInterfaceType::PixelType at(const ImageInterfaceTypePtr &image, std::size_t x, std::size_t y)
STL class.
float interpolate_pix(float *pix, float x, float y, int xsize, int ysize, interpenum interptype)
std::vector< ImageInterfaceType::PixelType >::iterator iterator
static ImageInterfaceTypePtr factory(std::size_t width, std::size_t height)
SourceXtractor::VectorImage< SourceXtractor::SeFloat > ImageInterfaceType
static std::size_t width(const ImageInterfaceTypePtr &image)
std::shared_ptr< ImageInterfaceType > ImageInterfaceTypePtr
std::shared_ptr< WriteableInterfaceType > WriteableInterfaceTypePtr
static std::size_t width(ImageType &image)
static iterator begin(const ImageInterfaceTypePtr &image)