ddt 1.2.1
Loading...
Searching...
No Matches
Protected Attributes | List of all members
ddt::BiasBuffer Class Reference

#include <biasBuffer.hpp>

Protected Attributes

ddt::DdtLoggerlogger
 
 BiasBuffer ()
 
 BiasBuffer (const int max_size=5)
 
virtual ~BiasBuffer ()
 
void set_logger (ddt::DdtLogger *const in_logger)
 
bool LoadBiasFileInSlot (const std::string &file_name, const int slot=0)
 
int LoadBiasFileInFreeSlot (const std::string &file_name)
 
bool StoreCPLAsBiasImageInSlot (const cpl_image *image, std::string slot_name, const int slot=0)
 
int StoreCPLAsBiasImageInFreeSlot (const cpl_image *const image, const std::string slot_name)
 
void ClearAll ()
 
void ClearSelected (const int slot)
 
cpl_image * get_Image (const int slot)
 
std::string get_SlotName (const int slot)
 
bool SubtractBiasImage (cpl_image *const source_image, const int slot=0)
 

Detailed Description

Class to wrap the internal CPL image. This is created from the incoming data stream rsp. from a loaded file.

It offers access to image properties.

Constructor & Destructor Documentation

◆ BiasBuffer() [1/2]

BiasBuffer::BiasBuffer ( )

Constructor

◆ BiasBuffer() [2/2]

BiasBuffer::BiasBuffer ( const int max_size = 5)

◆ ~BiasBuffer()

BiasBuffer::~BiasBuffer ( )
virtual

Destructor

Member Function Documentation

◆ ClearAll()

void BiasBuffer::ClearAll ( )

Clear all BIAS images

◆ ClearSelected()

void BiasBuffer::ClearSelected ( const int slot)

Clear the selected BIAS image, identified by its slot number

Parameters
slotthe index into the internal bias image array.

◆ get_Image()

cpl_image * BiasBuffer::get_Image ( const int slot)

Get the image data

Parameters
slotthe index into the internal bias image array.
Returns
the BIAS image stored in the slot, or nullptr in case that the slot number is out of range or there is no image stored in that slot

◆ get_SlotName()

std::string BiasBuffer::get_SlotName ( const int slot)

Get the slot name

Parameters
slotthe index into the internal bias image array.
Returns
the slot name related to the slot number, or empty string in case that the slot number is out of range or there is no image stored in that slot

◆ LoadBiasFileInFreeSlot()

int BiasBuffer::LoadBiasFileInFreeSlot ( const std::string & file_name)

Load bias file into the first free slot, if any, in the internal bias image array. This function takes a CPL file (FITS) name.

Parameters
file_namethe FITS file name to load
Returns
int slot number into which the image was stored, or -1 in case that storing was not possible

◆ LoadBiasFileInSlot()

bool BiasBuffer::LoadBiasFileInSlot ( const std::string & file_name,
const int slot = 0 )

Load bias file into a certain slot in the internal bias image array. This function takes a CPL file (FITS) name and a slot number. The default slot is the first.

Parameters
file_namethe FITS file name to load
slotthe index into the internal bias image array. This defaults to 0.
Returns
true if loading was successful, false otherwise

◆ set_logger()

void BiasBuffer::set_logger ( ddt::DdtLogger *const in_logger)

Set logger

Parameters
in_loggerA DDT logger object (no transfer of ownership).

◆ StoreCPLAsBiasImageInFreeSlot()

int BiasBuffer::StoreCPLAsBiasImageInFreeSlot ( const cpl_image *const image,
const std::string slot_name )

Store a CPL image into the first free slot, if any, in the internal bias image array.

Parameters
imagethe CPL image to store
slot_namethe name to store for this image. If an empty string is provided, a slot name will be created internally
Returns
int slot number into which the image was stored, or -1 in case that storing was not possible

◆ StoreCPLAsBiasImageInSlot()

bool BiasBuffer::StoreCPLAsBiasImageInSlot ( const cpl_image * image,
std::string slot_name,
const int slot = 0 )

Store a CPL image into a certain slot in the internal bias image array.

Parameters
imagethe CPL image to store
slot_namethe name to store for this image. If an empty string is provided, a slot name will be created internally
slotthe index into the internal bias image array. This defaults to 0.
Returns
true if storing was successful, false otherwise

◆ SubtractBiasImage()

bool BiasBuffer::SubtractBiasImage ( cpl_image *const source_image,
const int slot = 0 )

Subtract the bias image identified by the slot number from the provided source image

Parameters
source_imagethe image to subtract the bias image from
slotthe index into the internal bias image array.
Returns
true if subtraction was successful, false otherwise

Member Data Documentation

◆ logger

ddt::DdtLogger* ddt::BiasBuffer::logger
protected

The logger object


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