SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
ImageTile.cpp
Go to the documentation of this file.
1
17
21
22namespace SourceXtractor {
23
24std::shared_ptr<ImageTile> ImageTile::create(ImageType image_type, int x, int y, int width, int height, std::shared_ptr<ImageSource> source) {
25 switch (image_type) {
26 default:
27 case FloatImage:
28 return std::make_shared<ImageTileWithType<float>>(x, y, width, height, source);
29 case DoubleImage:
30 return std::make_shared<ImageTileWithType<double>>(x, y, width, height, source);
31 case IntImage:
32 return std::make_shared<ImageTileWithType<int>>(x, y, width, height, source);
33 case UIntImage:
34 return std::make_shared<ImageTileWithType<unsigned int>>(x, y, width, height, source);
35 case LongLongImage:
36 return std::make_shared<ImageTileWithType<std::int64_t>>(x, y, width, height, source);
37 }
38}
39
41 if (isModified()) {
42 m_source->saveTile(*this);
43 setModified(false);
44 }
45}
46
47}
48
49
bool isModified() const
Definition ImageTile.h:91
std::shared_ptr< ImageSource > m_source
Definition ImageTile.h:152
void setModified(bool modified)
Definition ImageTile.h:87
static std::shared_ptr< ImageTile > create(ImageType image_type, int x, int y, int width, int height, std::shared_ptr< ImageSource > source=nullptr)
Definition ImageTile.cpp:24
T make_shared(T... args)