SourceXtractorPlusPlus  0.15
Please provide a description of the project.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::FitsFile Class Reference

represents access to a whole FITS file and handles loading and caching FITS headers More...

#include <FitsFile.h>

Collaboration diagram for SourceXtractor::FitsFile:
[legend]

Public Member Functions

 FitsFile (const boost::filesystem::path &path, bool writeable)
 
 FitsFile (FitsFile &&)=default
 
virtual ~FitsFile ()
 
fitsfile * getFitsFilePtr ()
 
const std::vector< int > & getImageHdus () const
 
std::map< std::string, MetadataEntry > & getHDUHeaders (int hdu)
 
void refresh ()
 

Private Member Functions

void open ()
 
void loadInfo ()
 
void loadFitsHeader ()
 
void loadHeadFile ()
 

Private Attributes

boost::filesystem::path m_path
 
bool m_is_writeable
 
std::unique_ptr< fitsfile, void(*)(fitsfile *)> m_fits_ptr
 
std::vector< int > m_image_hdus
 
std::vector< std::map< std::string, MetadataEntry > > m_headers
 

Detailed Description

represents access to a whole FITS file and handles loading and caching FITS headers

Definition at line 43 of file FitsFile.h.

Constructor & Destructor Documentation

◆ FitsFile() [1/2]

SourceXtractor::FitsFile::FitsFile ( const boost::filesystem::path path,
bool  writeable 
)

Definition at line 93 of file FitsFile.cpp.

References loadInfo(), and open().

Here is the call graph for this function:

◆ FitsFile() [2/2]

SourceXtractor::FitsFile::FitsFile ( FitsFile &&  )
default

◆ ~FitsFile()

SourceXtractor::FitsFile::~FitsFile ( )
virtual

Definition at line 100 of file FitsFile.cpp.

Member Function Documentation

◆ getFitsFilePtr()

fitsfile * SourceXtractor::FitsFile::getFitsFilePtr ( )

Definition at line 102 of file FitsFile.cpp.

References std::unique_ptr< T >::get(), and m_fits_ptr.

Referenced by SourceXtractor::FitsImageSource::FitsImageSource(), SourceXtractor::FitsImageSource::getImageTile(), SourceXtractor::FitsImageSource::saveTile(), and SourceXtractor::FitsImageSource::setMetadata().

Here is the call graph for this function:

◆ getHDUHeaders()

std::map< std::string, MetadataEntry > & SourceXtractor::FitsFile::getHDUHeaders ( int  hdu)

Definition at line 110 of file FitsFile.cpp.

References m_headers.

Referenced by SourceXtractor::FitsImageSource::getMetadata().

◆ getImageHdus()

const std::vector< int > & SourceXtractor::FitsFile::getImageHdus ( ) const

Definition at line 106 of file FitsFile.cpp.

References m_image_hdus.

◆ loadFitsHeader()

void SourceXtractor::FitsFile::loadFitsHeader ( )
private

Definition at line 226 of file FitsFile.cpp.

References std::unique_ptr< T >::get(), SourceXtractor::loadHeadersFromFits(), m_fits_ptr, and m_headers.

Referenced by loadInfo().

Here is the call graph for this function:

◆ loadHeadFile()

void SourceXtractor::FitsFile::loadHeadFile ( )
private

Definition at line 244 of file FitsFile.cpp.

References std::vector< T >::begin(), std::vector< T >::end(), std::getline(), std::ifstream::good(), std::ifstream::is_open(), m_headers, m_image_hdus, m_path, std::ifstream::open(), std::string::size(), and SourceXtractor::valueAutoCast().

Referenced by loadInfo().

Here is the call graph for this function:

◆ loadInfo()

void SourceXtractor::FitsFile::loadInfo ( )
private

Definition at line 153 of file FitsFile.cpp.

References std::vector< T >::clear(), std::vector< T >::emplace_back(), std::unique_ptr< T >::get(), loadFitsHeader(), loadHeadFile(), m_fits_ptr, m_headers, m_image_hdus, and m_path.

Referenced by FitsFile(), and refresh().

Here is the call graph for this function:

◆ open()

void SourceXtractor::FitsFile::open ( )
private

Definition at line 114 of file FitsFile.cpp.

References m_fits_ptr, m_is_writeable, m_path, and std::unique_ptr< T >::reset().

Referenced by FitsFile().

Here is the call graph for this function:

◆ refresh()

void SourceXtractor::FitsFile::refresh ( )

Definition at line 134 of file FitsFile.cpp.

References loadInfo(), m_fits_ptr, m_is_writeable, m_path, and std::unique_ptr< T >::reset().

Here is the call graph for this function:

Member Data Documentation

◆ m_fits_ptr

std::unique_ptr<fitsfile, void (*)(fitsfile*)> SourceXtractor::FitsFile::m_fits_ptr
private

Definition at line 62 of file FitsFile.h.

Referenced by getFitsFilePtr(), loadFitsHeader(), loadInfo(), open(), and refresh().

◆ m_headers

std::vector<std::map<std::string, MetadataEntry> > SourceXtractor::FitsFile::m_headers
private

Definition at line 64 of file FitsFile.h.

Referenced by getHDUHeaders(), loadFitsHeader(), loadHeadFile(), and loadInfo().

◆ m_image_hdus

std::vector<int> SourceXtractor::FitsFile::m_image_hdus
private

Definition at line 63 of file FitsFile.h.

Referenced by getImageHdus(), loadHeadFile(), and loadInfo().

◆ m_is_writeable

bool SourceXtractor::FitsFile::m_is_writeable
private

Definition at line 61 of file FitsFile.h.

Referenced by open(), and refresh().

◆ m_path

boost::filesystem::path SourceXtractor::FitsFile::m_path
private

Definition at line 60 of file FitsFile.h.

Referenced by loadHeadFile(), loadInfo(), open(), and refresh().


The documentation for this class was generated from the following files: