CARTA Backend
The backend component of CARTA
Loading...
Searching...
No Matches
carta::CartaFitsImage Class Reference

#include <CartaFitsImage.h>

Inheritance diagram for carta::CartaFitsImage:
[legend]
Collaboration diagram for carta::CartaFitsImage:
[legend]

Public Member Functions

 CartaFitsImage (const std::string &filename, unsigned int hdu=0, bool is_http=false)
 
 CartaFitsImage (const CartaFitsImage &other)
 
 ~CartaFitsImage () override
 
casacore::String imageType () const override
 
casacore::String name (bool stripPath=false) const override
 
casacore::IPosition shape () const override
 
casacore::Bool ok () const override
 
casacore::DataType dataType () const override
 
casacore::Bool doGetSlice (casacore::Array< float > &buffer, const casacore::Slicer &section) override
 
void doPutSlice (const casacore::Array< float > &buffer, const casacore::IPosition &where, const casacore::IPosition &stride) override
 
const casacore::LatticeRegion * getRegionPtr () const override
 
casacore::ImageInterface< float > * cloneII () const override
 
void resize (const casacore::TiledShape &newShape) override
 
casacore::uInt advisedMaxPixels () const override
 
casacore::IPosition doNiceCursorShape (casacore::uInt maxPixels) const override
 
casacore::Bool isMasked () const override
 
casacore::Bool hasPixelMask () const override
 
const casacore::Lattice< bool > & pixelMask () const override
 
casacore::Lattice< bool > & pixelMask () override
 
casacore::Bool doGetMaskSlice (casacore::Array< bool > &buffer, const casacore::Slicer &section) override
 
casacore::DataType internalDataType () const
 
casacore::Vector< casacore::String > FitsHeaderStrings ()
 

Private Member Functions

fitsfile * OpenFile ()
 
void CloseFile ()
 
void CloseFileIfError (const int &status, const std::string &error)
 
void CheckFileStatus (fitsfile *fptr)
 
void SetUpImage ()
 
void GetFitsHeaderString (int &nheaders, std::string &hdrstr)
 
void SetFitsHeaderStrings (int nheaders, const std::string &header)
 
casacore::CoordinateSystem SetCoordinateSystem (int nheaders, const std::string &header_str, casacore::RecordInterface &unused_headers, int &stokes_fits_value)
 
bool AddDirectionCoordinate (casacore::CoordinateSystem &coord_sys, const ::wcsprm &wcs, std::vector< int > &direction_axes)
 
bool AddStokesCoordinate (casacore::CoordinateSystem &coord_sys, const ::wcsprm &wcs, const casacore::IPosition &shape, int &stokes_fits_value, int &stokes_axis)
 
bool AddSpectralCoordinate (casacore::CoordinateSystem &coord_sys, const ::wcsprm &wcs, const casacore::IPosition &shape, int &spectral_axis, int &linear_spectral_axis)
 
casacore::MFrequency::Types GetFrequencyType (const ::wcsprm &wcs_spectral)
 
bool AddLinearCoordinate (casacore::CoordinateSystem &coord_sys, const ::wcsprm &wcs, std::vector< int > &linear_axes)
 
void SetCoordSysOrder (casacore::CoordinateSystem &coord_sys, int naxes, std::vector< int > &special_axes, std::vector< int > &lin_axes)
 
void SetHeaderRec (char *header, casacore::RecordInterface &header_rec)
 
void ReadBeamsTable (casacore::ImageInfo &image_info)
 
void AddObsInfo (casacore::CoordinateSystem &coord_sys, casacore::RecordInterface &header_rec)
 
void SetPixelMask ()
 
bool doGetNanMaskSlice (casacore::Array< bool > &buffer, const casacore::Slicer &section)
 
template<typename T >
bool GetDataSubset (int datatype, const casacore::Slicer &section, casacore::Array< float > &buffer)
 
template<typename T >
bool GetPixelMask (int datatype, const casacore::IPosition &shape, casacore::ArrayLattice< bool > &mask)
 
template<typename T >
bool GetNanPixelMask (casacore::ArrayLattice< bool > &mask)
 

Private Attributes

std::string _filename
 
unsigned int _hdu
 
fitsfile * _fptr
 
std::mutex _fptr_mutex
 
bool _is_compressed
 
casacore::IPosition _shape
 
int _bitpix
 
int _equiv_bitpix
 
bool _has_blanks
 
casacore::Vector< casacore::String > _all_header_strings
 
casacore::Vector< casacore::String > _image_header_strings
 
casacore::Lattice< bool > * _pixel_mask
 
casacore::TiledShape _tiled_shape
 
bool _is_copy
 
bool _is_http
 

Constructor & Destructor Documentation

◆ CartaFitsImage() [1/2]

CartaFitsImage::CartaFitsImage ( const std::string &  filename,
unsigned int  hdu = 0,
bool  is_http = false 
)
Here is the call graph for this function:

◆ CartaFitsImage() [2/2]

CartaFitsImage::CartaFitsImage ( const CartaFitsImage other)

◆ ~CartaFitsImage()

CartaFitsImage::~CartaFitsImage ( )
override
Here is the call graph for this function:

Member Function Documentation

◆ AddDirectionCoordinate()

bool CartaFitsImage::AddDirectionCoordinate ( casacore::CoordinateSystem &  coord_sys,
const ::wcsprm &  wcs,
std::vector< int > &  direction_axes 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddLinearCoordinate()

bool CartaFitsImage::AddLinearCoordinate ( casacore::CoordinateSystem &  coord_sys,
const ::wcsprm &  wcs,
std::vector< int > &  linear_axes 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddObsInfo()

void CartaFitsImage::AddObsInfo ( casacore::CoordinateSystem &  coord_sys,
casacore::RecordInterface &  header_rec 
)
private
Here is the caller graph for this function:

◆ AddSpectralCoordinate()

bool CartaFitsImage::AddSpectralCoordinate ( casacore::CoordinateSystem &  coord_sys,
const ::wcsprm &  wcs,
const casacore::IPosition &  shape,
int &  spectral_axis,
int &  linear_spectral_axis 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddStokesCoordinate()

bool CartaFitsImage::AddStokesCoordinate ( casacore::CoordinateSystem &  coord_sys,
const ::wcsprm &  wcs,
const casacore::IPosition &  shape,
int &  stokes_fits_value,
int &  stokes_axis 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ advisedMaxPixels()

casacore::uInt CartaFitsImage::advisedMaxPixels ( ) const
override

◆ CheckFileStatus()

void carta::CartaFitsImage::CheckFileStatus ( fitsfile *  fptr)
private

◆ cloneII()

casacore::ImageInterface< float > * CartaFitsImage::cloneII ( ) const
override

◆ CloseFile()

void CartaFitsImage::CloseFile ( )
private
Here is the caller graph for this function:

◆ CloseFileIfError()

void CartaFitsImage::CloseFileIfError ( const int &  status,
const std::string &  error 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dataType()

casacore::DataType CartaFitsImage::dataType ( ) const
override
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doGetMaskSlice()

casacore::Bool CartaFitsImage::doGetMaskSlice ( casacore::Array< bool > &  buffer,
const casacore::Slicer &  section 
)
override
Here is the call graph for this function:

◆ doGetNanMaskSlice()

bool CartaFitsImage::doGetNanMaskSlice ( casacore::Array< bool > &  buffer,
const casacore::Slicer &  section 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doGetSlice()

casacore::Bool CartaFitsImage::doGetSlice ( casacore::Array< float > &  buffer,
const casacore::Slicer &  section 
)
override
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doNiceCursorShape()

casacore::IPosition CartaFitsImage::doNiceCursorShape ( casacore::uInt  maxPixels) const
override

◆ doPutSlice()

void CartaFitsImage::doPutSlice ( const casacore::Array< float > &  buffer,
const casacore::IPosition &  where,
const casacore::IPosition &  stride 
)
override

◆ FitsHeaderStrings()

casacore::Vector< casacore::String > CartaFitsImage::FitsHeaderStrings ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDataSubset()

template<typename T >
bool carta::CartaFitsImage::GetDataSubset ( int  datatype,
const casacore::Slicer &  section,
casacore::Array< float > &  buffer 
)
private

◆ GetFitsHeaderString()

void CartaFitsImage::GetFitsHeaderString ( int &  nheaders,
std::string &  hdrstr 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFrequencyType()

casacore::MFrequency::Types CartaFitsImage::GetFrequencyType ( const ::wcsprm &  wcs_spectral)
private
Here is the caller graph for this function:

◆ GetNanPixelMask()

template<typename T >
bool carta::CartaFitsImage::GetNanPixelMask ( casacore::ArrayLattice< bool > &  mask)
private

◆ GetPixelMask()

template<typename T >
bool carta::CartaFitsImage::GetPixelMask ( int  datatype,
const casacore::IPosition &  shape,
casacore::ArrayLattice< bool > &  mask 
)
private

◆ getRegionPtr()

const casacore::LatticeRegion * CartaFitsImage::getRegionPtr ( ) const
override

◆ hasPixelMask()

casacore::Bool CartaFitsImage::hasPixelMask ( ) const
override

◆ imageType()

casacore::String CartaFitsImage::imageType ( ) const
override

◆ internalDataType()

casacore::DataType CartaFitsImage::internalDataType ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMasked()

casacore::Bool CartaFitsImage::isMasked ( ) const
override

◆ name()

casacore::String CartaFitsImage::name ( bool  stripPath = false) const
override
Here is the caller graph for this function:

◆ ok()

casacore::Bool CartaFitsImage::ok ( ) const
override
Here is the caller graph for this function:

◆ OpenFile()

fitsfile * CartaFitsImage::OpenFile ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pixelMask() [1/2]

const casacore::Lattice< bool > & CartaFitsImage::pixelMask ( ) const
override
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pixelMask() [2/2]

casacore::Lattice< bool > & CartaFitsImage::pixelMask ( )
override
Here is the call graph for this function:

◆ ReadBeamsTable()

void CartaFitsImage::ReadBeamsTable ( casacore::ImageInfo &  image_info)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize()

void CartaFitsImage::resize ( const casacore::TiledShape &  newShape)
override

◆ SetCoordinateSystem()

casacore::CoordinateSystem CartaFitsImage::SetCoordinateSystem ( int  nheaders,
const std::string &  header_str,
casacore::RecordInterface &  unused_headers,
int &  stokes_fits_value 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCoordSysOrder()

void CartaFitsImage::SetCoordSysOrder ( casacore::CoordinateSystem &  coord_sys,
int  naxes,
std::vector< int > &  special_axes,
std::vector< int > &  lin_axes 
)
private
Here is the caller graph for this function:

◆ SetFitsHeaderStrings()

void CartaFitsImage::SetFitsHeaderStrings ( int  nheaders,
const std::string &  header 
)
private
Here is the caller graph for this function:

◆ SetHeaderRec()

void CartaFitsImage::SetHeaderRec ( char *  header,
casacore::RecordInterface &  header_rec 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPixelMask()

void CartaFitsImage::SetPixelMask ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetUpImage()

void CartaFitsImage::SetUpImage ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ shape()

casacore::IPosition CartaFitsImage::shape ( ) const
override
Here is the caller graph for this function:

Member Data Documentation

◆ _all_header_strings

casacore::Vector<casacore::String> carta::CartaFitsImage::_all_header_strings
private

◆ _bitpix

int carta::CartaFitsImage::_bitpix
private

◆ _equiv_bitpix

int carta::CartaFitsImage::_equiv_bitpix
private

◆ _filename

std::string carta::CartaFitsImage::_filename
private

◆ _fptr

fitsfile* carta::CartaFitsImage::_fptr
private

◆ _fptr_mutex

std::mutex carta::CartaFitsImage::_fptr_mutex
private

◆ _has_blanks

bool carta::CartaFitsImage::_has_blanks
private

◆ _hdu

unsigned int carta::CartaFitsImage::_hdu
private

◆ _image_header_strings

casacore::Vector<casacore::String> carta::CartaFitsImage::_image_header_strings
private

◆ _is_compressed

bool carta::CartaFitsImage::_is_compressed
private

◆ _is_copy

bool carta::CartaFitsImage::_is_copy
private

◆ _is_http

bool carta::CartaFitsImage::_is_http
private

◆ _pixel_mask

casacore::Lattice<bool>* carta::CartaFitsImage::_pixel_mask
private

◆ _shape

casacore::IPosition carta::CartaFitsImage::_shape
private

◆ _tiled_shape

casacore::TiledShape carta::CartaFitsImage::_tiled_shape
private

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