ddt 1.2.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ddt::ImageBuffer Class Reference

#include <imageBuffer.hpp>

Public Member Functions

void * get_ImageData ()
 

Protected Attributes

ddt::DdtLoggerlogger
 
 ImageBuffer ()
 
virtual ~ImageBuffer ()
 
void set_logger (ddt::DdtLogger *const in_logger)
 
bool LoadFile (const std::string &file_name, const int position=0)
 
template<typename TPOINTER >
bool LoadPointer (TPOINTER *new_image_data, int nx, int ny)
 
bool LoadFilePlane (const std::string &file_name, const int position=0, const int plane=0)
 
bool LoadImageExtensionsAsOne (const std::string &file_name)
 
bool LoadCPLImage (cpl_image *const image)
 
bool LoadActualConfigurationMap (const std::string configuration_map_name)
 
bool LoadConfigurationMaps (const std::string configuration_map_source)
 
bool LoadInformationMaps (const std::string information_map_source)
 
std::shared_ptr< DdtEncDecget_MetadataSample ()
 
cpl_image * get_Image ()
 
std::string LastTimestampFromBuffer () const
 
cpl_table * get_BinaryTable ()
 
FitsExtensionget_FitsExtensionInfo (const int extension_number)
 
FitsExtension get_PrimaryHDUInfo () const
 
int get_ImageWidth () const
 
int get_ImageHeight () const
 
int get_NumberPlanes () const
 
int get_CurrentPlane () const
 
void set_CurrentPlane (const int plane)
 
int get_NumberExtensions ()
 
int get_NumberAxis () const
 
cpl_wcs * get_Wcs ()
 
cpl_propertylist * get_PropertyList ()
 
cpl_apertures * get_CircularObjects (const double sigma)
 
double get_PixelValue (const int x_image, const int y_image, int *const is_rejected)
 
bool get_AttachedToStream () const
 
bool get_LastSegment () const
 
bool get_FirstSegmentReceived () const
 
bool get_ConfigurationMap_Value (const double x, const double y, double *const value) const
 
std::list< std::string > get_TextInformation (const double x, const double y) const
 
std::vector< int > get_invalid_image_hdus () const
 
void AttachDataStream (const std::string data_stream_id)
 
void DetachDataStream (const std::string data_stream_id)
 
ddt::DdtStatisticsget_DataStatistics ()
 
void set_RetrieveStatsFlag (bool value)
 
SignalTImageDataAvailableSignal ()
 
void FreeResources ()
 
static void AddWCSItemsToPropList (cpl_propertylist *const prop_list, const std::shared_ptr< DdtEncDec > enc_dec)
 
static int32_t BitsPerPixelFromDataType (const uint32_t data_type)
 

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

◆ ImageBuffer()

ImageBuffer::ImageBuffer ( )

Constructor

◆ ~ImageBuffer()

ImageBuffer::~ImageBuffer ( )
virtual

Destructor

Member Function Documentation

◆ AddWCSItemsToPropList()

void ImageBuffer::AddWCSItemsToPropList ( cpl_propertylist *const prop_list,
const std::shared_ptr< DdtEncDec > enc_dec )
static

◆ AttachDataStream()

void ImageBuffer::AttachDataStream ( const std::string data_stream_id)

Attach to a data stream

Parameters
data_stream_idThe ID of the data stream (could be the URI)

◆ BitsPerPixelFromDataType()

int32_t ImageBuffer::BitsPerPixelFromDataType ( const uint32_t data_type)
static

◆ DetachDataStream()

void ImageBuffer::DetachDataStream ( const std::string data_stream_id)

Detach from a data stream

Parameters
data_stream_idThe ID of the stream to be disconnected

◆ FreeResources()

void ImageBuffer::FreeResources ( )

◆ get_AttachedToStream()

bool ImageBuffer::get_AttachedToStream ( ) const

Get the attached to stream flag from the data acquisition

Returns
the flag indicating if the data acquisition is attached to a data stream

◆ get_BinaryTable()

cpl_table * ImageBuffer::get_BinaryTable ( )

Get the binary table data

◆ get_CircularObjects()

cpl_apertures * ImageBuffer::get_CircularObjects ( const double sigma)

Get a list of objects from a CPL image

Parameters
sigmathe detection level
Returns
list of cpl_apertures objects

◆ get_ConfigurationMap_Value()

bool ImageBuffer::get_ConfigurationMap_Value ( const double x,
const double y,
double *const value ) const

Get the value from a configuration map located at the specified x/y coordinate.

Parameters
xthe x coordinate
ythe y coordinate
valuethe value at the specified coordinate, or 0.0 in case of error
Returns
true if value could be determined, false otherwise

◆ get_CurrentPlane()

int ImageBuffer::get_CurrentPlane ( ) const

Get the currently selected plane.

Returns
the currently selected plane number

◆ get_DataStatistics()

ddt::DdtStatistics * ImageBuffer::get_DataStatistics ( )

Statistics from data subscriber

Returns
Pointer to current Monitor Samples

◆ get_FirstSegmentReceived()

bool ImageBuffer::get_FirstSegmentReceived ( ) const

Get the first segment received flag, indicating if the current image is the first segment of a segmented image

Returns
the flag indicating the first segment received

◆ get_FitsExtensionInfo()

FitsExtension * ImageBuffer::get_FitsExtensionInfo ( const int extension_number)

Get the information about one file extension

Parameters
extension_numberthe extension number
Returns
the FitsExtension object corresponding to the extension number, or nullptr if no such object is available

◆ get_Image()

cpl_image * ImageBuffer::get_Image ( )

Get the image data

◆ get_ImageData()

void * ddt::ImageBuffer::get_ImageData ( )

Get the image data

◆ get_ImageHeight()

int ImageBuffer::get_ImageHeight ( ) const

Get the image height

◆ get_ImageWidth()

int ImageBuffer::get_ImageWidth ( ) const

Get the image width

◆ get_invalid_image_hdus()

std::vector< int > ImageBuffer::get_invalid_image_hdus ( ) const

Get the information about invalid image HDUs

Returns
Vector of invalid HDUs

◆ get_LastSegment()

bool ImageBuffer::get_LastSegment ( ) const

Get the last segment flag, indicating if the current image is complete or the last segment of a segmented image

Returns
the flag indicating the last segment

◆ get_MetadataSample()

std::shared_ptr< DdtEncDec > ImageBuffer::get_MetadataSample ( )

Get the metadata image samples

◆ get_NumberAxis()

int ImageBuffer::get_NumberAxis ( ) const

Get the number of axis in the image

◆ get_NumberExtensions()

int ImageBuffer::get_NumberExtensions ( )

Get the number of extensions in the image

◆ get_NumberPlanes()

int ImageBuffer::get_NumberPlanes ( ) const

Get the number of planes in the image

◆ get_PixelValue()

double ImageBuffer::get_PixelValue ( const int x_image,
const int y_image,
int *const is_rejected )

Get the pixel value from the internal image at a certain position

Parameters
x_imagethe pixel x position
y_imagethe pixel y position
is_rejectedset to 1 if the pixel is bad, 0 if good, or -1 on error
Returns
double pixel value (cast to double) or undefined

◆ get_PrimaryHDUInfo()

FitsExtension ImageBuffer::get_PrimaryHDUInfo ( ) const

Get the information about the primary HDU

Returns
the FitsExtension object corresponding to the primary HDU

◆ get_PropertyList()

cpl_propertylist * ImageBuffer::get_PropertyList ( )

Get the property list

Returns
the property list

◆ get_TextInformation()

std::list< std::string > ImageBuffer::get_TextInformation ( const double x,
const double y ) const

Get the textual information contained in a configuration text info file related to a certain position

Parameters
xthe x coordinate
ythe y coordinate
Returns
list of strings containing the textual information

◆ get_Wcs()

cpl_wcs * ImageBuffer::get_Wcs ( )

Get the WCS object

Returns
the WCS object

◆ ImageDataAvailableSignal()

SignalT * ImageBuffer::ImageDataAvailableSignal ( )

Provide the image data available signal

◆ LastTimestampFromBuffer()

std::string ImageBuffer::LastTimestampFromBuffer ( ) const

Get last timestamp

◆ LoadActualConfigurationMap()

bool ImageBuffer::LoadActualConfigurationMap ( const std::string configuration_map_name)

Load the supplied configuration map as the actual configuration map.

Parameters
configuration_map_namethe name of the configuration map to be loaded.
Returns
true if loading was successful, false otherwise

◆ LoadConfigurationMaps()

bool ImageBuffer::LoadConfigurationMaps ( const std::string configuration_map_source)

Load the configuration maps from the specified configuration map source.

Parameters
configuration_map_sourcethe source of the configuration maps

◆ LoadCPLImage()

bool ImageBuffer::LoadCPLImage ( cpl_image *const image)

Load a CPL image into the image buffer

Parameters
imagethe CPL image to load
Returns
true if loading was successful, false otherwise

◆ LoadFile()

bool ImageBuffer::LoadFile ( const std::string & file_name,
const int position = 0 )

Load file. This function takes a CPL file (FITS) name and a position. The position indicates the HDU to use. The default HDU is the first (position 0).

Parameters
file_namethe FITS file name to load
positionthe position indicating the HDU to use. This defaults to 0 (the first HDU).
Returns
true if loading was successful, false otherwise

◆ LoadFilePlane()

bool ImageBuffer::LoadFilePlane ( const std::string & file_name,
const int position = 0,
const int plane = 0 )

Load certain plain from a 3D cube CPL file.

Parameters
file_namethe FITS file name to load
positionthe position indicating the HDU to use. This defaults to 0 (the first HDU).
planethe plane of the HDU to load. This defaults to 0.
Returns
true if loading was successful, false otherwise

◆ LoadImageExtensionsAsOne()

bool ImageBuffer::LoadImageExtensionsAsOne ( const std::string & file_name)

Load all image HDUs into one image. This function takes a CPL file (FITS) name.

Parameters
file_namethe FITS file name to load
Returns
true if loading was successful, false otherwise

◆ LoadInformationMaps()

bool ImageBuffer::LoadInformationMaps ( const std::string information_map_source)

Load the information maps from the specified information map source.

Parameters
information_map_sourcethe source of the information maps

◆ LoadPointer()

template<class TPOINTER >
template bool ImageBuffer::LoadPointer< int16_t > ( TPOINTER * new_image_data,
int nx,
int ny )

Load in-memory pointer to array. This function takes the pointer to a an array, and its x and y dimensions and loads it using CPL methods.

Parameters
new_image_datapointer to an array of type TPOINTER
nxfirst dimension size
nysecond dimension size
Returns
true if loading was successful, false otherwise

◆ set_CurrentPlane()

void ImageBuffer::set_CurrentPlane ( const int plane)

Set the plane to be loaded.

Parameters
planethe plane number

◆ set_logger()

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

Set logger

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

◆ set_RetrieveStatsFlag()

void ImageBuffer::set_RetrieveStatsFlag ( bool value)

Enable or Disables subscriber statistics

Parameters
valueFlag to read statitics

Member Data Documentation

◆ logger

ddt::DdtLogger* ddt::ImageBuffer::logger
protected

The logger object


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