ddt  0.1
Public Member Functions | Protected Attributes | List of all members
ddt::ImageBuffer Class Reference

#include <imageBuffer.hpp>

Public Member Functions

 ImageBuffer ()
 
virtual ~ImageBuffer ()
 
void set_logger (ddt::DdtLogger *logger)
 
bool LoadFile (const std::string &file_name, int position=0)
 
bool LoadImageExtensionsAsOne (const std::string &file_name)
 
bool LoadCPLImage (cpl_image *image)
 
bool LoadActualConfigurationMap (std::string configuration_map_name)
 
bool LoadConfigurationMaps (std::string configuration_map_source)
 
void * get_ImageData ()
 
cpl_image * get_Image ()
 
cpl_table * get_BinaryTable ()
 
FitsExtensionget_FitsExtensionInfo (const int extension_number)
 
FitsExtension get_PrimaryHDUInfo () const
 
int get_ImageWidth ()
 
int get_ImageHeight ()
 
int get_NumberPlanes ()
 
int get_NumberExtensions ()
 
int get_NumberAxis ()
 
cpl_wcs * get_Wcs ()
 
cpl_propertylist * get_PropertyList ()
 
cpl_apertures * get_CircularObjects (double sigma)
 
double get_PixelValue (int x_image, int y_image, int *is_rejected)
 
bool get_AttachedToStream ()
 
bool get_LastSegment ()
 
bool get_FirstSegmentReceived ()
 
void AttachDataStream (std::string data_stream_id)
 
void DetachDataStream (std::string data_stream_id)
 
signal_tImageDataAvailableSignal ()
 

Protected Attributes

ddt::DdtLoggerlogger
 

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

◆ AttachDataStream()

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

Attach to a data stream

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

◆ DetachDataStream()

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

Detach from a data stream

Parameters
data_stream_idThe ID of the stream to be disconnected

◆ get_AttachedToStream()

bool ImageBuffer::get_AttachedToStream ( )

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 ( double  sigma)

Get a list of objects from a CPL image

Parameters
sigmathe detection level
Returns
list of cpl_apertures objects

◆ get_FirstSegmentReceived()

bool ImageBuffer::get_FirstSegmentReceived ( )

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
theextension 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 ( )

Get the image height

◆ get_ImageWidth()

int ImageBuffer::get_ImageWidth ( )

Get the image width

◆ get_LastSegment()

bool ImageBuffer::get_LastSegment ( )

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_NumberAxis()

int ImageBuffer::get_NumberAxis ( )

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 ( )

Get the number of planes in the image

◆ get_PixelValue()

double ImageBuffer::get_PixelValue ( int  x_image,
int  y_image,
int *  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_Wcs()

cpl_wcs * ImageBuffer::get_Wcs ( )

Get the WCS object

Returns
the WCS object

◆ ImageDataAvailableSignal()

signal_t * ImageBuffer::ImageDataAvailableSignal ( )

Provide the image data available signal

◆ LoadActualConfigurationMap()

bool ImageBuffer::LoadActualConfigurationMap ( 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 ( std::string  configuration_map_source)

Load the configuration maps from the specified configuration map source.

Parameters
config_map_sourcethe source of the configuration maps

◆ LoadCPLImage()

bool ImageBuffer::LoadCPLImage ( cpl_image *  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,
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

◆ 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

◆ set_logger()

void ImageBuffer::set_logger ( ddt::DdtLogger logger)

Set logger

Parameters
loggerThe logger object

Member Data Documentation

◆ logger

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

The logger object


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