SourceXtractorPlusPlus  0.12
Please provide a description of the project.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::SE2BackgroundModeller Class Reference

#include <SE2BackgroundModeller.h>

Collaboration diagram for SourceXtractor::SE2BackgroundModeller:
[legend]

Public Member Functions

 SE2BackgroundModeller (std::shared_ptr< DetectionImage > image, std::shared_ptr< WeightImage > variance_map=nullptr, std::shared_ptr< Image< unsigned char >> mask=nullptr, const unsigned char mask_type_flag=0x0001)
 
virtual ~SE2BackgroundModeller ()
 
void createSE2Models (std::shared_ptr< TypedSplineModelWrapper< SeFloat >> &bckPtr, std::shared_ptr< TypedSplineModelWrapper< SeFloat >> &sigPtr, PIXTYPE &sigFac, const size_t *bckCellSize, const WeightImage::PixelType varianceThreshold, const size_t *filterBoxSize, const float &filterThreshold=0.0)
 
PIXTYPEgetWhtMeanVals ()
 
void computeScalingFactor (PIXTYPE *whtMeanVals, PIXTYPE *bckSigVals, PIXTYPE &sigFac, const size_t nGridPoints)
 

Private Member Functions

void getMinIncr (size_t &nElements, long *incr, const size_t *subImgNaxes)
 
void filter (PIXTYPE *bckVals, PIXTYPE *sigmaVals, const size_t *gridSize, const size_t *filterSize, const float &filterThreshold=0.0)
 
void replaceUNDEF (PIXTYPE *bckVals, PIXTYPE *sigmaVals, const size_t *gridSize)
 
void filterMedian (PIXTYPE *bckVals, PIXTYPE *sigmaVals, const size_t *gridSize, const size_t *filterSize, const float filterThresh=0.0)
 
void rescaleThreshold (PIXTYPE &weightVarThreshold, const PIXTYPE &weightThreshold)
 

Private Attributes

boost::filesystem::path itsInputMaskName
 
boost::filesystem::path itsInputFileName
 
boost::filesystem::path itsInputWeightName
 
int itsWeightTypeFlag =0
 
unsigned char itsMaskType
 
std::shared_ptr< DetectionImageitsImage =nullptr
 
std::shared_ptr< WeightImageitsVariance =nullptr
 
std::shared_ptr< Image< unsigned char > > itsMask =nullptr
 
bool itsHasVariance =false
 
bool itsHasMask =false
 
PIXTYPEitsWhtMeanVals =NULL
 
size_t itsNaxes [2] ={0,0}
 

Detailed Description

Definition at line 38 of file SE2BackgroundModeller.h.

Constructor & Destructor Documentation

◆ SE2BackgroundModeller()

SourceXtractor::SE2BackgroundModeller::SE2BackgroundModeller ( std::shared_ptr< DetectionImage image,
std::shared_ptr< WeightImage variance_map = nullptr,
std::shared_ptr< Image< unsigned char >>  mask = nullptr,
const unsigned char  mask_type_flag = 0x0001 
)

Definition at line 41 of file SE2BackgroundModeller.cpp.

◆ ~SE2BackgroundModeller()

SourceXtractor::SE2BackgroundModeller::~SE2BackgroundModeller ( )
virtual

Definition at line 66 of file SE2BackgroundModeller.cpp.

Member Function Documentation

◆ computeScalingFactor()

void SourceXtractor::SE2BackgroundModeller::computeScalingFactor ( PIXTYPE whtMeanVals,
PIXTYPE bckSigVals,
PIXTYPE sigFac,
const size_t  nGridPoints 
)

Definition at line 559 of file SE2BackgroundModeller.cpp.

References SourceXtractor::bck_model_logger, and Elements::Logging::debug().

Here is the call graph for this function:

◆ createSE2Models()

void SourceXtractor::SE2BackgroundModeller::createSE2Models ( std::shared_ptr< TypedSplineModelWrapper< SeFloat >> &  bckPtr,
std::shared_ptr< TypedSplineModelWrapper< SeFloat >> &  sigPtr,
PIXTYPE sigFac,
const size_t bckCellSize,
const WeightImage::PixelType  varianceThreshold,
const size_t filterBoxSize,
const float &  filterThreshold = 0.0 
)

Definition at line 71 of file SE2BackgroundModeller.cpp.

References SourceXtractor::bck_model_logger, BIG, Elements::Logging::debug(), std::div(), and SourceXtractor::BackgroundCell::getBackgroundValues().

Here is the call graph for this function:

◆ filter()

void SourceXtractor::SE2BackgroundModeller::filter ( PIXTYPE bckVals,
PIXTYPE sigmaVals,
const size_t gridSize,
const size_t filterSize,
const float &  filterThreshold = 0.0 
)
private

Definition at line 297 of file SE2BackgroundModeller.cpp.

◆ filterMedian()

void SourceXtractor::SE2BackgroundModeller::filterMedian ( PIXTYPE bckVals,
PIXTYPE sigmaVals,
const size_t gridSize,
const size_t filterSize,
const float  filterThresh = 0.0 
)
private

Definition at line 426 of file SE2BackgroundModeller.cpp.

References std::fabs(), x, and y.

Here is the call graph for this function:

◆ getMinIncr()

void SourceXtractor::SE2BackgroundModeller::getMinIncr ( size_t nElements,
long *  incr,
const size_t subImgNaxes 
)
private

Definition at line 241 of file SE2BackgroundModeller.cpp.

References BACK_BUFSIZE, SourceXtractor::bck_model_logger, Elements::Logging::debug(), and std::div().

Here is the call graph for this function:

◆ getWhtMeanVals()

PIXTYPE * SourceXtractor::SE2BackgroundModeller::getWhtMeanVals ( )

Definition at line 651 of file SE2BackgroundModeller.cpp.

◆ replaceUNDEF()

void SourceXtractor::SE2BackgroundModeller::replaceUNDEF ( PIXTYPE bckVals,
PIXTYPE sigmaVals,
const size_t gridSize 
)
private

Definition at line 308 of file SE2BackgroundModeller.cpp.

References SourceXtractor::bck_model_logger, BIG, Elements::Logging::debug(), e, std::fabs(), SIZETSUB, x, and y.

Here is the call graph for this function:

◆ rescaleThreshold()

void SourceXtractor::SE2BackgroundModeller::rescaleThreshold ( PIXTYPE weightVarThreshold,
const PIXTYPE weightThreshold 
)
private

Definition at line 613 of file SE2BackgroundModeller.cpp.

References BIG, RMS_FIELD, VAR_FIELD, and WEIGHT_FIELD.

Member Data Documentation

◆ itsHasMask

bool SourceXtractor::SE2BackgroundModeller::itsHasMask =false
private

Definition at line 71 of file SE2BackgroundModeller.h.

◆ itsHasVariance

bool SourceXtractor::SE2BackgroundModeller::itsHasVariance =false
private

Definition at line 70 of file SE2BackgroundModeller.h.

◆ itsImage

std::shared_ptr<DetectionImage> SourceXtractor::SE2BackgroundModeller::itsImage =nullptr
private

Definition at line 66 of file SE2BackgroundModeller.h.

◆ itsInputFileName

boost::filesystem::path SourceXtractor::SE2BackgroundModeller::itsInputFileName
private

Definition at line 61 of file SE2BackgroundModeller.h.

◆ itsInputMaskName

boost::filesystem::path SourceXtractor::SE2BackgroundModeller::itsInputMaskName
private

Definition at line 60 of file SE2BackgroundModeller.h.

◆ itsInputWeightName

boost::filesystem::path SourceXtractor::SE2BackgroundModeller::itsInputWeightName
private

Definition at line 62 of file SE2BackgroundModeller.h.

◆ itsMask

std::shared_ptr< Image<unsigned char> > SourceXtractor::SE2BackgroundModeller::itsMask =nullptr
private

Definition at line 68 of file SE2BackgroundModeller.h.

◆ itsMaskType

unsigned char SourceXtractor::SE2BackgroundModeller::itsMaskType
private

Definition at line 64 of file SE2BackgroundModeller.h.

◆ itsNaxes

size_t SourceXtractor::SE2BackgroundModeller::itsNaxes[2] ={0,0}
private

Definition at line 76 of file SE2BackgroundModeller.h.

◆ itsVariance

std::shared_ptr< WeightImage> SourceXtractor::SE2BackgroundModeller::itsVariance =nullptr
private

Definition at line 67 of file SE2BackgroundModeller.h.

◆ itsWeightTypeFlag

int SourceXtractor::SE2BackgroundModeller::itsWeightTypeFlag =0
private

Definition at line 63 of file SE2BackgroundModeller.h.

◆ itsWhtMeanVals

PIXTYPE* SourceXtractor::SE2BackgroundModeller::itsWhtMeanVals =NULL
private

Definition at line 73 of file SE2BackgroundModeller.h.


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