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

#include <MomentGenerator.h>

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

Public Member Functions

 MomentGenerator (const casacore::String &filename, std::shared_ptr< casacore::ImageInterface< float > > image)
 
 ~MomentGenerator ()=default
 
bool CalculateMoments (int file_id, const casacore::ImageRegion &image_region, int spectral_axis, int stokes_axis, int name_index, const GeneratorProgressCallback &progress_callback, const CARTA::MomentRequest &moment_request, CARTA::MomentResponse &moment_response, std::vector< GeneratedImage > &collapse_results, const RegionState &region_state, const std::string &stokes)
 
void StopCalculation ()
 
bool IsSuccess () const
 
bool IsCancelled () const
 
casacore::String GetErrorMessage () const
 
void setStepCount (int count)
 
void setStepsCompleted (int count)
 
void done ()
 

Private Member Functions

void SetMomentAxis (const CARTA::MomentRequest &moment_request)
 
void SetMomentTypes (const CARTA::MomentRequest &moment_request)
 
void SetPixelRange (const CARTA::MomentRequest &moment_request)
 
void SetRestFrequency (const CARTA::MomentRequest &moment_request)
 
void ResetImageMoments (const casacore::ImageRegion &image_region)
 
void SetImageRestFrequency (double rest_frequency)
 
int GetMomentMode (CARTA::Moment moment)
 
casacore::String GetMomentSuffix (casacore::Int moment)
 
casacore::String GetInputFileName ()
 
void SetMomentTypeMaps ()
 
void SetMomentImageLogger (const CARTA::MomentRequest &moment_request, const RegionState &region_state, const std::string &stokes)
 

Private Attributes

casacore::String _filename
 
std::shared_ptr< casacore::ImageInterface< float > > _image
 
int _spectral_axis
 
int _stokes_axis
 
casacore::LoggerHolder _logger
 
std::unique_ptr< casacore::ImageInterface< casacore::Float > > _sub_image
 
std::unique_ptr< ImageMoments< casacore::Float > > _image_moments
 
casacore::Vector< casacore::Int > _moments
 
int _axis
 
casacore::Vector< float > _include_pix
 
casacore::Vector< float > _exclude_pix
 
double _rest_frequency
 
casacore::String _error_msg
 
bool _success
 
bool _cancel
 
std::unordered_map< CARTA::Moment, ImageMoments< casacore::Float >::MomentTypes > _moment_map
 
std::unordered_map< ImageMoments< casacore::Float >::MomentTypes, casacore::String > _moment_suffix_map
 
int _total_steps
 
float _progress
 
float _pre_progress
 
GeneratorProgressCallback _progress_callback
 
std::chrono::high_resolution_clock::time_point _start_time
 
bool _first_report_made
 

Constructor & Destructor Documentation

◆ MomentGenerator()

MomentGenerator::MomentGenerator ( const casacore::String &  filename,
std::shared_ptr< casacore::ImageInterface< float > >  image 
)
Here is the call graph for this function:

◆ ~MomentGenerator()

carta::MomentGenerator::~MomentGenerator ( )
default

Member Function Documentation

◆ CalculateMoments()

bool MomentGenerator::CalculateMoments ( int  file_id,
const casacore::ImageRegion &  image_region,
int  spectral_axis,
int  stokes_axis,
int  name_index,
const GeneratorProgressCallback progress_callback,
const CARTA::MomentRequest &  moment_request,
CARTA::MomentResponse &  moment_response,
std::vector< GeneratedImage > &  collapse_results,
const RegionState region_state,
const std::string &  stokes 
)
Here is the call graph for this function:

◆ done()

void MomentGenerator::done ( )

◆ GetErrorMessage()

casacore::String MomentGenerator::GetErrorMessage ( ) const
Here is the caller graph for this function:

◆ GetInputFileName()

casacore::String MomentGenerator::GetInputFileName ( )
private
Here is the caller graph for this function:

◆ GetMomentMode()

int MomentGenerator::GetMomentMode ( CARTA::Moment  moment)
private
Here is the caller graph for this function:

◆ GetMomentSuffix()

casacore::String MomentGenerator::GetMomentSuffix ( casacore::Int  moment)
private
Here is the caller graph for this function:

◆ IsCancelled()

bool MomentGenerator::IsCancelled ( ) const
Here is the caller graph for this function:

◆ IsSuccess()

bool MomentGenerator::IsSuccess ( ) const
Here is the caller graph for this function:

◆ ResetImageMoments()

void MomentGenerator::ResetImageMoments ( const casacore::ImageRegion &  image_region)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetImageRestFrequency()

void MomentGenerator::SetImageRestFrequency ( double  rest_frequency)
private
Here is the caller graph for this function:

◆ SetMomentAxis()

void MomentGenerator::SetMomentAxis ( const CARTA::MomentRequest &  moment_request)
private
Here is the caller graph for this function:

◆ SetMomentImageLogger()

void MomentGenerator::SetMomentImageLogger ( const CARTA::MomentRequest &  moment_request,
const RegionState region_state,
const std::string &  stokes 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetMomentTypeMaps()

void MomentGenerator::SetMomentTypeMaps ( )
inlineprivate
Here is the caller graph for this function:

◆ SetMomentTypes()

void MomentGenerator::SetMomentTypes ( const CARTA::MomentRequest &  moment_request)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPixelRange()

void MomentGenerator::SetPixelRange ( const CARTA::MomentRequest &  moment_request)
private
Here is the caller graph for this function:

◆ SetRestFrequency()

void MomentGenerator::SetRestFrequency ( const CARTA::MomentRequest &  moment_request)
private
Here is the caller graph for this function:

◆ setStepCount()

void MomentGenerator::setStepCount ( int  count)

◆ setStepsCompleted()

void MomentGenerator::setStepsCompleted ( int  count)

◆ StopCalculation()

void MomentGenerator::StopCalculation ( )

Member Data Documentation

◆ _axis

int carta::MomentGenerator::_axis
private

◆ _cancel

bool carta::MomentGenerator::_cancel
private

◆ _error_msg

casacore::String carta::MomentGenerator::_error_msg
private

◆ _exclude_pix

casacore::Vector<float> carta::MomentGenerator::_exclude_pix
private

◆ _filename

casacore::String carta::MomentGenerator::_filename
private

◆ _first_report_made

bool carta::MomentGenerator::_first_report_made
private

◆ _image

std::shared_ptr<casacore::ImageInterface<float> > carta::MomentGenerator::_image
private

◆ _image_moments

std::unique_ptr<ImageMoments<casacore::Float> > carta::MomentGenerator::_image_moments
private

◆ _include_pix

casacore::Vector<float> carta::MomentGenerator::_include_pix
private

◆ _logger

casacore::LoggerHolder carta::MomentGenerator::_logger
private

◆ _moment_map

std::unordered_map<CARTA::Moment, ImageMoments<casacore::Float>::MomentTypes> carta::MomentGenerator::_moment_map
private

◆ _moment_suffix_map

std::unordered_map<ImageMoments<casacore::Float>::MomentTypes, casacore::String> carta::MomentGenerator::_moment_suffix_map
private

◆ _moments

casacore::Vector<casacore::Int> carta::MomentGenerator::_moments
private

◆ _pre_progress

float carta::MomentGenerator::_pre_progress
private

◆ _progress

float carta::MomentGenerator::_progress
private

◆ _progress_callback

GeneratorProgressCallback carta::MomentGenerator::_progress_callback
private

◆ _rest_frequency

double carta::MomentGenerator::_rest_frequency
private

◆ _spectral_axis

int carta::MomentGenerator::_spectral_axis
private

◆ _start_time

std::chrono::high_resolution_clock::time_point carta::MomentGenerator::_start_time
private

◆ _stokes_axis

int carta::MomentGenerator::_stokes_axis
private

◆ _sub_image

std::unique_ptr<casacore::ImageInterface<casacore::Float> > carta::MomentGenerator::_sub_image
private

◆ _success

bool carta::MomentGenerator::_success
private

◆ _total_steps

int carta::MomentGenerator::_total_steps
private

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