SourceXtractorPlusPlus  0.15
Please provide a description of the project.
ImageTile.cpp
Go to the documentation of this file.
1 
21 
22 namespace SourceXtractor {
23 
24 std::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 
std::shared_ptr
STL class.
SourceXtractor::ImageTile::IntImage
@ IntImage
Definition: ImageTile.h:41
SourceXtractor::ImageTile::DoubleImage
@ DoubleImage
Definition: ImageTile.h:40
SourceXtractor::ImageTile::create
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
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::ImageTile::UIntImage
@ UIntImage
Definition: ImageTile.h:42
ImageTile.h
Image.h
SourceXtractor::ImageTile::isModified
bool isModified() const
Definition: ImageTile.h:93
SourceXtractor::ImageTile::m_source
std::shared_ptr< ImageSource > m_source
Definition: ImageTile.h:154
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition: MoffatModelFittingTask.cpp:94
ImageSource.h
SourceXtractor::ImageTile::LongLongImage
@ LongLongImage
Definition: ImageTile.h:43
SourceXtractor::ImageTile::setModified
void setModified(bool modified)
Definition: ImageTile.h:89
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition: MoffatModelFittingTask.cpp:94
SourceXtractor::ImageTile::ImageType
ImageType
Definition: ImageTile.h:37
SourceXtractor::ImageTile::saveIfModified
virtual void saveIfModified()
Definition: ImageTile.cpp:40
SourceXtractor::ImageTile::FloatImage
@ FloatImage
Definition: ImageTile.h:39