SourceXtractorPlusPlus  0.14
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageTile.cpp
Go to the documentation of this file.
1 
21 
22 namespace SourceXtractor {
23 
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 
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
void setModified(bool modified)
Definition: ImageTile.h:89
virtual void saveIfModified()
Definition: ImageTile.cpp:40
std::shared_ptr< ImageSource > m_source
Definition: ImageTile.h:154
bool isModified() const
Definition: ImageTile.h:93
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