|
SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
|
#include <FitsImageSource.h>


Public Member Functions | |
| FitsImageSource (const std::string &filename, int hdu_number=0, ImageTile::ImageType image_type=ImageTile::AutoType, std::shared_ptr< FileManager > manager=FileManager::getDefault()) | |
| FitsImageSource (const std::string &filename, int width, int height, ImageTile::ImageType image_type, const std::shared_ptr< CoordinateSystem > coord_system=nullptr, bool append=false, bool empty_primary=false, std::shared_ptr< FileManager > manager=FileManager::getDefault()) | |
| virtual | ~FitsImageSource ()=default |
| std::string | getRepr () const override |
| Human readable representation of this source. | |
| int | getWidth () const override |
| Returns the width of the image in pixels. | |
| int | getHeight () const override |
| Returns the height of the image in pixels. | |
| int | getDepth () const |
| Returns the depth of the image in pixels. | |
| void | setLayer (int layer) |
| std::shared_ptr< ImageTile > | getImageTile (int x, int y, int width, int height) const override |
| void | saveTile (ImageTile &tile) override |
| template<typename TT> | |
| bool | readFitsKeyword (const std::string &header_keyword, TT &out_value) const |
| int | getHDU () const |
| ImageTile::ImageType | getType () const override |
| std::unique_ptr< std::vector< char > > | getFitsHeaders (int &number_of_records) const |
| const std::map< std::string, MetadataEntry > & | getMetadata () const override |
| void | setMetadata (const std::string &key, const MetadataEntry &value) override |
| Public Member Functions inherited from SourceXtractor::ImageSource | |
| ImageSource () | |
| virtual | ~ImageSource ()=default |
| Public Member Functions inherited from std::enable_shared_from_this< ImageSource > | |
| T | enable_shared_from_this (T... args) |
| T | operator= (T... args) |
| T | shared_from_this (T... args) |
| T | ~enable_shared_from_this (T... args) |
Private Member Functions | |
| void | switchHdu (fitsfile *fptr, int hdu_number) const |
| int | getDataType () const |
| int | getImageType () const |
Private Attributes | |
| std::string | m_filename |
| std::shared_ptr< FileManager > | m_file_manager |
| std::shared_ptr< FileHandler > | m_handler |
| int | m_hdu_number |
| int | m_width |
| int | m_height |
| int | m_depth |
| ImageTile::ImageType | m_image_type |
| int | m_current_layer |
Definition at line 46 of file FitsImageSource.h.
|
explicit |
Constructor
| filename | Path to the FITS file |
| hdu_number | HDU number. If <= 0, the constructor will use the first HDU containing an image |
| manager |
Definition at line 74 of file FitsImageSource.cpp.
References SourceXtractor::FitsFile::getFitsFilePtr(), m_depth, m_file_manager, m_filename, m_handler, m_hdu_number, m_height, m_image_type, m_width, std::move(), and switchHdu().

| SourceXtractor::FitsImageSource::FitsImageSource | ( | const std::string & | filename, |
| int | width, | ||
| int | height, | ||
| ImageTile::ImageType | image_type, | ||
| const std::shared_ptr< CoordinateSystem > | coord_system = nullptr, | ||
| bool | append = false, | ||
| bool | empty_primary = false, | ||
| std::shared_ptr< FileManager > | manager = FileManager::getDefault() ) |
Definition at line 118 of file FitsImageSource.cpp.
References getDataType(), SourceXtractor::FitsFile::getFitsFilePtr(), getImageType(), SourceXtractor::ImageTile::getTypeSize(), SourceXtractor::FileHandler::kWrite, std::left(), m_file_manager, m_filename, m_handler, m_hdu_number, m_height, m_image_type, m_width, std::move(), std::setw(), and std::ostringstream::str().

|
virtualdefault |
|
private |
Definition at line 358 of file FitsImageSource.cpp.
References SourceXtractor::ImageTile::DoubleImage, SourceXtractor::ImageTile::FloatImage, SourceXtractor::ImageTile::IntImage, SourceXtractor::ImageTile::LongLongImage, m_image_type, and SourceXtractor::ImageTile::UIntImage.
Referenced by FitsImageSource(), getImageTile(), and saveTile().
|
inline |
Returns the depth of the image in pixels.
Definition at line 86 of file FitsImageSource.h.
References m_depth.
| std::unique_ptr< std::vector< char > > SourceXtractor::FitsImageSource::getFitsHeaders | ( | int & | number_of_records | ) | const |
Definition at line 282 of file FitsImageSource.cpp.
References std::string::begin(), std::string::end(), getMetadata(), SourceXtractor::make_unique(), std::string::size(), and SourceXtractor::VariantCast().
Referenced by SourceXtractor::WCS::WCS().

|
inline |
Definition at line 107 of file FitsImageSource.h.
References m_hdu_number.
|
inlineoverridevirtual |
Returns the height of the image in pixels.
Implements SourceXtractor::ImageSource.
Definition at line 81 of file FitsImageSource.h.
References m_height.
|
overridevirtual |
Implements SourceXtractor::ImageSource.
Definition at line 209 of file FitsImageSource.cpp.
References std::const_pointer_cast(), SourceXtractor::ImageTile::create(), getDataType(), SourceXtractor::FitsFile::getFitsFilePtr(), m_current_layer, m_handler, m_hdu_number, m_image_type, std::enable_shared_from_this< ImageSource >::shared_from_this(), and switchHdu().

|
private |
Definition at line 374 of file FitsImageSource.cpp.
References SourceXtractor::ImageTile::DoubleImage, SourceXtractor::ImageTile::FloatImage, SourceXtractor::ImageTile::IntImage, SourceXtractor::ImageTile::LongLongImage, m_image_type, and SourceXtractor::ImageTile::UIntImage.
Referenced by FitsImageSource().
|
overridevirtual |
Reimplemented from SourceXtractor::ImageSource.
Definition at line 327 of file FitsImageSource.cpp.
References SourceXtractor::FitsFile::getHDUHeaders(), m_handler, and m_hdu_number.
Referenced by getFitsHeaders(), and readFitsKeyword().

|
inlineoverridevirtual |
Human readable representation of this source.
Implements SourceXtractor::ImageSource.
Definition at line 71 of file FitsImageSource.h.
References m_filename.
|
inlineoverridevirtual |
Implements SourceXtractor::ImageSource.
Definition at line 111 of file FitsImageSource.h.
References m_image_type.
|
inlineoverridevirtual |
Returns the width of the image in pixels.
Implements SourceXtractor::ImageSource.
Definition at line 76 of file FitsImageSource.h.
References m_width.
|
inline |
Definition at line 97 of file FitsImageSource.h.
References getMetadata(), and SourceXtractor::VariantCast().

|
overridevirtual |
Implements SourceXtractor::ImageSource.
Definition at line 234 of file FitsImageSource.cpp.
References SourceXtractor::ImageTile::getDataPtr(), getDataType(), SourceXtractor::FitsFile::getFitsFilePtr(), SourceXtractor::ImageTile::getHeight(), SourceXtractor::ImageTile::getPosX(), SourceXtractor::ImageTile::getPosY(), SourceXtractor::ImageTile::getWidth(), SourceXtractor::FileHandler::kWrite, m_handler, m_hdu_number, and switchHdu().

| void SourceXtractor::FitsImageSource::setLayer | ( | int | layer | ) |
Definition at line 275 of file FitsImageSource.cpp.
References m_current_layer, m_depth, and m_filename.
|
overridevirtual |
Reimplemented from SourceXtractor::ImageSource.
Definition at line 332 of file FitsImageSource.cpp.
References SourceXtractor::FitsFile::getFitsFilePtr(), SourceXtractor::FileHandler::kWrite, std::left(), m_handler, m_hdu_number, SourceXtractor::MetadataEntry::m_value, std::setw(), std::ostringstream::str(), switchHdu(), and SourceXtractor::VariantCast().

|
private |
Definition at line 258 of file FitsImageSource.cpp.
References m_filename.
Referenced by FitsImageSource(), getImageTile(), saveTile(), and setMetadata().
|
private |
Definition at line 139 of file FitsImageSource.h.
Referenced by getImageTile(), and setLayer().
|
private |
Definition at line 136 of file FitsImageSource.h.
Referenced by FitsImageSource(), getDepth(), and setLayer().
|
private |
Definition at line 129 of file FitsImageSource.h.
Referenced by FitsImageSource(), and FitsImageSource().
|
private |
Definition at line 128 of file FitsImageSource.h.
Referenced by FitsImageSource(), FitsImageSource(), getRepr(), setLayer(), and switchHdu().
|
private |
Definition at line 130 of file FitsImageSource.h.
Referenced by FitsImageSource(), FitsImageSource(), getImageTile(), getMetadata(), saveTile(), and setMetadata().
|
private |
Definition at line 132 of file FitsImageSource.h.
Referenced by FitsImageSource(), FitsImageSource(), getHDU(), getImageTile(), getMetadata(), saveTile(), and setMetadata().
|
private |
Definition at line 135 of file FitsImageSource.h.
Referenced by FitsImageSource(), FitsImageSource(), and getHeight().
|
private |
Definition at line 137 of file FitsImageSource.h.
Referenced by FitsImageSource(), FitsImageSource(), getDataType(), getImageTile(), getImageType(), and getType().
|
private |
Definition at line 134 of file FitsImageSource.h.
Referenced by FitsImageSource(), FitsImageSource(), and getWidth().