|
SourceXtractorPlusPlus
0.10
Please provide a description of the project.
|
#include <FitsImageSource.h>
Public Member Functions | |
| FitsImageSource (const std::string &filename, int hdu_number=0, std::shared_ptr< FitsFileManager > manager=FitsFileManager::getInstance()) | |
| FitsImageSource (const std::string &filename, int width, int height, const std::shared_ptr< CoordinateSystem > coord_system=nullptr, std::shared_ptr< FitsFileManager > manager=FitsFileManager::getInstance()) | |
| virtual | ~FitsImageSource ()=default |
| std::string | getRepr () const override |
| Human readable representation of this source. More... | |
| std::shared_ptr< ImageTile< T > > | getImageTile (int x, int y, int width, int height) const override |
| int | getWidth () const override |
| Returns the width of the image in pixels. More... | |
| int | getHeight () const override |
| Returns the height of the image in pixels. More... | |
| void | saveTile (ImageTile< T > &tile) override |
| template<typename TT > | |
| bool | readFitsKeyword (const std::string &header_keyword, TT &out_value) |
| int | getHDU () const |
Public Member Functions inherited from SourceXtractor::ImageSource< T > | |
| ImageSource () | |
| virtual | ~ImageSource ()=default |
Public Member Functions inherited from SourceXtractor::ImageSourceBase | |
| virtual | ~ImageSourceBase ()=default |
Public Member Functions inherited from std::enable_shared_from_this< ImageSource< T > > | |
| 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 |
| void | loadHeadFile () |
| int | getDataType () const |
| int | getImageType () const |
| template<> | |
| int | getDataType () const |
| template<> | |
| int | getDataType () const |
| template<> | |
| int | getDataType () const |
| template<> | |
| int | getDataType () const |
| template<> | |
| int | getDataType () const |
| template<> | |
| int | getDataType () const |
| template<> | |
| int | getImageType () const |
| template<> | |
| int | getImageType () const |
| template<> | |
| int | getImageType () const |
| template<> | |
| int | getImageType () const |
| template<> | |
| int | getImageType () const |
| template<> | |
| int | getImageType () const |
Private Attributes | |
| std::string | m_filename |
| std::shared_ptr< FitsFileManager > | m_manager |
| int | m_width |
| int | m_height |
| int | m_hdu_number |
| std::map< std::string, std::string > | m_header |
Definition at line 38 of file FitsImageSource.h.
| SourceXtractor::FitsImageSource< T >::FitsImageSource | ( | const std::string & | filename, |
| int | hdu_number = 0, |
||
| std::shared_ptr< FitsFileManager > | manager = FitsFileManager::getInstance() |
||
| ) |
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 62 of file FitsImageSource.cpp.
References conf::filename, SourceXtractor::loadFitsHeader(), SourceXtractor::FitsImageSource< T >::loadHeadFile(), SourceXtractor::FitsImageSource< T >::m_hdu_number, SourceXtractor::FitsImageSource< T >::m_header, SourceXtractor::FitsImageSource< T >::m_height, SourceXtractor::FitsImageSource< T >::m_manager, SourceXtractor::FitsImageSource< T >::m_width, and SourceXtractor::FitsImageSource< T >::switchHdu().
| SourceXtractor::FitsImageSource< T >::FitsImageSource | ( | const std::string & | filename, |
| int | width, | ||
| int | height, | ||
| const std::shared_ptr< CoordinateSystem > | coord_system = nullptr, |
||
| std::shared_ptr< FitsFileManager > | manager = FitsFileManager::getInstance() |
||
| ) |
Definition at line 94 of file FitsImageSource.cpp.
References conf::filename, SourceXtractor::FitsImageSource< T >::getDataType(), SourceXtractor::FitsImageSource< T >::getImageType(), ModelFitting::height, std::left(), SourceXtractor::FitsImageSource< T >::m_hdu_number, SourceXtractor::FitsImageSource< T >::m_height, SourceXtractor::FitsImageSource< T >::m_manager, SourceXtractor::FitsImageSource< T >::m_width, std::setw(), std::ostringstream::str(), SourceXtractor::FitsImageSource< T >::switchHdu(), and ModelFitting::width.
|
virtualdefault |
|
private |
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource().
|
private |
Definition at line 257 of file FitsImageSource.cpp.
|
private |
Definition at line 260 of file FitsImageSource.cpp.
|
private |
Definition at line 263 of file FitsImageSource.cpp.
|
private |
Definition at line 266 of file FitsImageSource.cpp.
|
private |
Definition at line 270 of file FitsImageSource.cpp.
|
private |
Definition at line 273 of file FitsImageSource.cpp.
|
inline |
Definition at line 86 of file FitsImageSource.h.
References SourceXtractor::FitsImageSource< T >::m_hdu_number.
|
inlineoverridevirtual |
Returns the height of the image in pixels.
Implements SourceXtractor::ImageSource< T >.
Definition at line 70 of file FitsImageSource.h.
References SourceXtractor::FitsImageSource< T >::m_height.
|
overridevirtual |
Implements SourceXtractor::ImageSource< T >.
Definition at line 150 of file FitsImageSource.cpp.
References ModelFitting::height, ModelFitting::width, x, and y.
|
private |
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource().
|
private |
Definition at line 276 of file FitsImageSource.cpp.
|
private |
Definition at line 279 of file FitsImageSource.cpp.
|
private |
Definition at line 282 of file FitsImageSource.cpp.
|
private |
Definition at line 285 of file FitsImageSource.cpp.
|
private |
Definition at line 289 of file FitsImageSource.cpp.
|
private |
Definition at line 292 of file FitsImageSource.cpp.
|
inlineoverridevirtual |
Human readable representation of this source.
Implements SourceXtractor::ImageSourceBase.
Definition at line 58 of file FitsImageSource.h.
References SourceXtractor::FitsImageSource< T >::m_filename.
|
inlineoverridevirtual |
Returns the width of the image in pixels.
Implements SourceXtractor::ImageSource< T >.
Definition at line 65 of file FitsImageSource.h.
References SourceXtractor::FitsImageSource< T >::m_width.
|
private |
Definition at line 213 of file FitsImageSource.cpp.
References conf::filename, std::getline(), std::ifstream::good(), std::ifstream::is_open(), std::ifstream::open(), and std::string::size().
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource().
|
inline |
Definition at line 77 of file FitsImageSource.h.
References std::map< K, T >::end(), std::map< K, T >::find(), and SourceXtractor::FitsImageSource< T >::m_header.
|
overridevirtual |
Implements SourceXtractor::ImageSource< T >.
Definition at line 174 of file FitsImageSource.cpp.
References SourceXtractor::ImageTile< T >::getImage(), SourceXtractor::ImageTile< T >::getPosX(), SourceXtractor::ImageTile< T >::getPosY(), ModelFitting::height, ModelFitting::width, x, and y.
|
private |
Definition at line 197 of file FitsImageSource.cpp.
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource().
|
private |
Definition at line 99 of file FitsImageSource.h.
Referenced by SourceXtractor::FitsImageSource< T >::getRepr().
|
private |
Definition at line 105 of file FitsImageSource.h.
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource(), and SourceXtractor::FitsImageSource< T >::getHDU().
|
private |
Definition at line 107 of file FitsImageSource.h.
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource(), and SourceXtractor::FitsImageSource< T >::readFitsKeyword().
|
private |
Definition at line 103 of file FitsImageSource.h.
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource(), and SourceXtractor::FitsImageSource< T >::getHeight().
|
private |
Definition at line 100 of file FitsImageSource.h.
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource().
|
private |
Definition at line 102 of file FitsImageSource.h.
Referenced by SourceXtractor::FitsImageSource< T >::FitsImageSource(), and SourceXtractor::FitsImageSource< T >::getWidth().
1.8.5