Base class for entropy-minimzation MR bias correction functional. More...
#include <cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h>
Classes | |
class | UpdateOutputImageThreadParameters |
Class for output image update thread parameters. More... | |
Public Types | |
typedef EntropyMinimizationIntensityCorrectionFunctionalBase | Self |
This class type. | |
typedef SmartPointer< Self > | SmartPtr |
Pointer to this class. | |
typedef Functional | Superclass |
Superclass type. | |
Public Member Functions | |
EntropyMinimizationIntensityCorrectionFunctionalBase () | |
Constructor. | |
virtual | ~EntropyMinimizationIntensityCorrectionFunctionalBase () |
Virtual destructor. | |
virtual size_t | GetNumberOfMonomialsAdd () const =0 |
Get number of additive monomials. | |
virtual size_t | GetNumberOfMonomialsMul () const =0 |
Get number of multiplicative monomials. | |
virtual void | SetInputImage (UniformVolume::SmartConstPtr &inputImage) |
Set input image. | |
virtual void | SetForegroundMask (const UniformVolume &foregroundMask) |
Set foreground mask. | |
virtual void | SetSamplingDensity (const float samplingDensity) |
Set sampling density. | |
virtual void | SetNumberOfHistogramBins (const size_t numberOfHistogramBins) |
Set number of histogram bins. | |
void | SetUseLogIntensities (const bool flag) |
Set flag for use of log intensities for entropy estimation. | |
virtual UniformVolume::SmartPtr & | GetOutputImage (const bool update=false) |
Get corrected output image. | |
virtual UniformVolume::SmartPtr & | GetOutputImage (CoordinateVector &v, const bool foregroundOnly=false) |
Update and return corrected output image. | |
virtual UniformVolume::SmartPtr | GetBiasFieldAdd (const bool updateCompleteImage=false) |
Get additive bias field. | |
virtual void | SetBiasFieldAdd (const UniformVolume &biasFieldAdd) |
Set additive bias field. | |
virtual UniformVolume::SmartPtr | GetBiasFieldMul (const bool updateCompleteImage=false) |
Get multiplicative bias field. | |
virtual void | SetBiasFieldMul (const UniformVolume &biasFieldMul) |
Set multiplicative bias field. | |
virtual Self::ReturnType | Evaluate () |
Evaluate functional. | |
virtual Self::ReturnType | EvaluateAt (CoordinateVector &v) |
Evaluate functional for given parameter vector. | |
Protected Types | |
typedef Histogram< unsigned int > | HistogramType |
Type for histogram. | |
typedef LogHistogram< unsigned int > | LogHistogramType |
Type for histogram using log-intensities. | |
Protected Member Functions | |
virtual void | UpdateCorrectionFactors ()=0 |
Update polynomial correction factors from input image. | |
virtual void | UpdateOutputImage (const bool foregroundOnly=true) |
Update output image estimate based on current bias field parameters. | |
virtual void | UpdateBiasFields (const bool foregroundOnly=true)=0 |
Jointly update both bias images. | |
virtual void | UpdateBiasFieldAdd (const bool foregroundOnly=true)=0 |
Update additive bias image. | |
virtual void | UpdateBiasFieldMul (const bool foregroundOnly=true)=0 |
Update additive bias image. | |
Protected Attributes | |
UniformVolume::SmartConstPtr | m_InputImage |
Original input image. | |
Types::DataItem | m_InputImageRange |
Input intensity image range. | |
UniformVolume::SmartPtr | m_OutputImage |
Evolving corrected output image. | |
HistogramType::SmartPtr | m_EntropyHistogram |
Histogram for entropy evaluation. | |
std::vector< bool > | m_ForegroundMask |
Binary foreground mask. | |
FloatArray::SmartPtr | m_BiasFieldAdd |
Additive bias field. | |
FloatArray::SmartPtr | m_BiasFieldMul |
Multiplicative bias field. | |
size_t | m_NumberOfPixels |
Number of input image pixels. | |
float | m_SamplingDensity |
Sampling density. | |
size_t | m_NumberOfHistogramBins |
Number of histogram bins for entropy estimation. | |
bool | m_UseLogIntensities |
Flag for using log-intensities for entropy estimation. | |
Static Private Member Functions | |
static void | UpdateOutputImageThreadFunc (void *args, const size_t taskIdx, const size_t taskCnt, const size_t, const size_t) |
Thread function: update output image. |
Base class for entropy-minimzation MR bias correction functional.
Definition at line 57 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
typedef Histogram<unsigned int> cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::HistogramType [protected] |
Type for histogram.
Definition at line 185 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
typedef LogHistogram<unsigned int> cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::LogHistogramType [protected] |
Type for histogram using log-intensities.
Definition at line 188 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
typedef EntropyMinimizationIntensityCorrectionFunctionalBase cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::Self |
This class type.
Reimplemented from cmtk::Functional.
Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >, and cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
Definition at line 62 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
Pointer to this class.
Reimplemented from cmtk::Functional.
Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >, and cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
Definition at line 65 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
Superclass type.
Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >, and cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
Definition at line 68 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::EntropyMinimizationIntensityCorrectionFunctionalBase | ( | ) | [inline] |
Constructor.
Definition at line 71 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::~EntropyMinimizationIntensityCorrectionFunctionalBase | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 78 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual Self::ReturnType cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::Evaluate | ( | ) | [inline, virtual] |
Evaluate functional.
Reimplemented from cmtk::Functional.
Definition at line 161 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual UniformVolume::SmartPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::GetBiasFieldAdd | ( | const bool | updateCompleteImage = false ) |
[inline, virtual] |
Get additive bias field.
Definition at line 127 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual UniformVolume::SmartPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::GetBiasFieldMul | ( | const bool | updateCompleteImage = false ) |
[inline, virtual] |
Get multiplicative bias field.
Definition at line 144 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual size_t cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::GetNumberOfMonomialsAdd | ( | ) | const [pure virtual] |
Get number of additive monomials.
Implemented in cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
virtual size_t cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::GetNumberOfMonomialsMul | ( | ) | const [pure virtual] |
Get number of multiplicative monomials.
Implemented in cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
virtual UniformVolume::SmartPtr& cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::GetOutputImage | ( | const bool | update = false ) |
[inline, virtual] |
Get corrected output image.
Definition at line 115 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::SetBiasFieldAdd | ( | const UniformVolume & | biasFieldAdd ) | [inline, virtual] |
Set additive bias field.
Definition at line 138 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::SetBiasFieldMul | ( | const UniformVolume & | biasFieldMul ) | [inline, virtual] |
Set multiplicative bias field.
Definition at line 155 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::SetNumberOfHistogramBins | ( | const size_t | numberOfHistogramBins ) | [inline, virtual] |
Set number of histogram bins.
Definition at line 99 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::SetSamplingDensity | ( | const float | samplingDensity ) | [inline, virtual] |
Set sampling density.
Definition at line 93 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::SetUseLogIntensities | ( | const bool | flag ) | [inline] |
Set flag for use of log intensities for entropy estimation.
Using log intensities compensates for the entropy increase otherwise caused by spreading distributions of values in brightened areas. This can help make bias field estimation more robust, potentially without any masking.
Definition at line 109 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::UpdateBiasFieldAdd | ( | const bool | foregroundOnly = true ) |
[protected, pure virtual] |
Update additive bias image.
foregroundOnly | If this flag is set and an image foreground mask is set, then only image pixels are updated for which the mask is nonzero. |
Implemented in cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::UpdateBiasFieldMul | ( | const bool | foregroundOnly = true ) |
[protected, pure virtual] |
Update additive bias image.
foregroundOnly | If this flag is set and an image foreground mask is set, then only image pixels are updated for which the mask is nonzero. |
Implemented in cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::UpdateBiasFields | ( | const bool | foregroundOnly = true ) |
[protected, pure virtual] |
Jointly update both bias images.
foregroundOnly | If this flag is set and an image foreground mask is set, then only image pixels are updated for which the mask is nonzero. |
Implemented in cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
virtual void cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::UpdateCorrectionFactors | ( | ) | [protected, pure virtual] |
Update polynomial correction factors from input image.
Implemented in cmtk::EntropyMinimizationIntensityCorrectionFunctional< NOrderAdd, NOrderMul >.
FloatArray::SmartPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_BiasFieldAdd [protected] |
Additive bias field.
Definition at line 205 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
FloatArray::SmartPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_BiasFieldMul [protected] |
Multiplicative bias field.
Definition at line 208 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
HistogramType::SmartPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_EntropyHistogram [protected] |
Histogram for entropy evaluation.
Definition at line 191 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
std::vector<bool> cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_ForegroundMask [protected] |
Binary foreground mask.
Definition at line 194 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
UniformVolume::SmartConstPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_InputImage [protected] |
Original input image.
Definition at line 176 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
Types::DataItem cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_InputImageRange [protected] |
Input intensity image range.
Definition at line 179 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
size_t cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_NumberOfHistogramBins [protected] |
Number of histogram bins for entropy estimation.
Definition at line 236 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
size_t cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_NumberOfPixels [protected] |
Number of input image pixels.
Reimplemented in cmtk::EntropyMinimizationIntensityCorrectionFunctionalDevice< NOrderAdd, NOrderMul >.
Definition at line 226 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
UniformVolume::SmartPtr cmtk::EntropyMinimizationIntensityCorrectionFunctionalBase::m_OutputImage [protected] |
Evolving corrected output image.
Definition at line 182 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
Sampling density.
This defines the fraction of foreground pixels that are considered in the computation.
Definition at line 233 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.
Flag for using log-intensities for entropy estimation.
Definition at line 239 of file cmtkEntropyMinimizationIntensityCorrectionFunctionalBase.h.