|
Image | Execute (const Image &image, const Image &maskImage) |
|
Image | Execute (const Image &image) |
|
Image | Execute (const Image &image, const Image &maskImage, double convergenceThreshold, std::vector< uint32_t > maximumNumberOfIterations, double biasFieldFullWidthAtHalfMaximum, double wienerFilterNoise, uint32_t numberOfHistogramBins, const std::vector< uint32_t > &numberOfControlPoints, uint32_t splineOrder, bool useMaskLabel, uint8_t maskLabel) |
|
Image | Execute (const Image &image, double convergenceThreshold, std::vector< uint32_t > maximumNumberOfIterations, double biasFieldFullWidthAtHalfMaximum, double wienerFilterNoise, uint32_t numberOfHistogramBins, const std::vector< uint32_t > &numberOfControlPoints, uint32_t splineOrder, bool useMaskLabel, uint8_t maskLabel) |
|
double | GetBiasFieldFullWidthAtHalfMaximum () const |
|
double | GetConvergenceThreshold () const |
|
uint8_t | GetMaskLabel () const |
|
std::vector< uint32_t > | GetMaximumNumberOfIterations () const |
|
std::string | GetName () const |
|
std::vector< uint32_t > | GetNumberOfControlPoints () const |
|
uint32_t | GetNumberOfHistogramBins () const |
|
uint32_t | GetSplineOrder () const |
|
bool | GetUseMaskLabel () const |
|
double | GetWienerFilterNoise () const |
|
| N4BiasFieldCorrectionImageFilter () |
|
Self & | SetBiasFieldFullWidthAtHalfMaximum (double BiasFieldFullWidthAtHalfMaximum) |
|
Self & | SetConvergenceThreshold (double ConvergenceThreshold) |
|
Self & | SetMaskLabel (uint8_t MaskLabel) |
|
Self & | SetMaximumNumberOfIterations (std::vector< uint32_t > MaximumNumberOfIterations) |
|
Self & | SetNumberOfControlPoints (const std::vector< uint32_t > &NumberOfControlPoints) |
|
Self & | SetNumberOfControlPoints (uint32_t value) |
|
Self & | SetNumberOfHistogramBins (uint32_t NumberOfHistogramBins) |
|
Self & | SetSplineOrder (uint32_t SplineOrder) |
|
Self & | SetUseMaskLabel (bool UseMaskLabel) |
|
Self & | SetWienerFilterNoise (double WienerFilterNoise) |
|
std::string | ToString () const |
|
Self & | UseMaskLabelOff () |
|
Self & | UseMaskLabelOn () |
|
virtual | ~N4BiasFieldCorrectionImageFilter () |
|
| ImageFilter () |
|
virtual | ~ImageFilter ()=0 |
|
virtual void | Abort () |
|
virtual int | AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd) |
| Add a Command Object to observer the event. More...
|
|
virtual float | GetProgress () const |
| An Active Measurement of the progress of execution. More...
|
|
virtual bool | HasCommand (itk::simple::EventEnum event) const |
| Query of this object has any registered commands for event. More...
|
|
| ProcessObject () |
|
virtual void | RemoveAllCommands () |
| Remove all registered commands. More...
|
|
virtual | ~ProcessObject () |
|
virtual void | DebugOn () |
|
virtual void | DebugOff () |
|
virtual bool | GetDebug () const |
|
virtual void | SetDebug (bool debugFlag) |
|
virtual void | SetNumberOfThreads (unsigned int n) |
|
virtual unsigned int | GetNumberOfThreads () const |
|
|
static bool | GetGlobalDefaultDebug () |
|
static void | GlobalDefaultDebugOff () |
|
static void | GlobalDefaultDebugOn () |
|
static void | SetGlobalDefaultDebug (bool debugFlag) |
|
static void | GlobalWarningDisplayOn () |
|
static void | GlobalWarningDisplayOff () |
|
static void | SetGlobalWarningDisplay (bool flag) |
|
static bool | GetGlobalWarningDisplay () |
|
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
|
static unsigned int | GetGlobalDefaultNumberOfThreads () |
|
static double | GetGlobalDefaultCoordinateTolerance () |
| Access the global tolerance to determine congruent spaces. More...
|
|
static void | SetGlobalDefaultCoordinateTolerance (double) |
| Access the global tolerance to determine congruent spaces. More...
|
|
static double | GetGlobalDefaultDirectionTolerance () |
| Access the global tolerance to determine congruent spaces. More...
|
|
static void | SetGlobalDefaultDirectionTolerance (double) |
| Access the global tolerance to determine congruent spaces. More...
|
|
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
|
virtual itk::ProcessObject * | GetActiveProcess () |
|
virtual void | OnActiveProcessDelete () |
|
virtual void | onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT |
|
virtual void | PreUpdate (itk::ProcessObject *p) |
|
virtual void | RemoveITKObserver (EventCommand &e) |
|
| NonCopyable () |
|
static void | FixNonZeroIndex (TImageType *img) |
|
template<class TImageType > |
static TImageType::ConstPointer | CastImageToITK (const Image &img) |
|
template<class TImageType > |
static Image | CastITKToImage (TImageType *img) |
|
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> |
static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
|
static const itk::EventObject & | GetITKEventObject (EventEnum e) |
|
template<typename T > |
static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
|
static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
|
static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
|
static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
|
Implementation of the N4 bias field correction algorithm.
The nonparametric nonuniform intensity normalization (N3) algorithm, as introduced by Sled et al. in 1998 is a method for correcting nonuniformity associated with MR images. The algorithm assumes a simple parametric model (Gaussian) for the bias field and does not require tissue class segmentation. In addition, there are only a couple of parameters to tune with the default values performing quite well. N3 has been publicly available as a set of perl scripts (http://www.bic.mni.mcgill.ca/ServicesSoftwareAdvancedImageProcessingTools/HomePage )
The N4 algorithm, encapsulated with this class, is a variation of the original N3 algorithm with the additional benefits of an improved B-spline fitting routine which allows for multiple resolutions to be used during the correction process. We also modify the iterative update component of algorithm such that the residual bias field is continually updated
Notes for the user:
- Since much of the image manipulation is done in the log space of the intensities, input images with negative and small values (< 1) can produce poor results.
- The original authors recommend performing the bias field correction on a downsampled version of the original image.
- A binary mask or a weighted image can be supplied. If a binary mask is specified, those voxels in the input image which correspond to the voxels in the mask image are used to estimate the bias field. If a UseMaskLabel value is set to true, only voxels in the MaskImage that match the MaskLabel will be used; otherwise, all non-zero voxels in the MaskImage will be masked. If a confidence image is specified, the input voxels are weighted in the b-spline fitting routine according to the confidence voxel values.
- The filter returns the corrected image. If the bias field is wanted, one can reconstruct it using the class itkBSplineControlPointImageFilter. See the IJ article and the test file for an example.
- The 'Z' parameter in Sled's 1998 paper is the square root of the class variable 'm_WienerFilterNoise'.
The basic algorithm iterates between sharpening the intensity histogram of the corrected input image and spatially smoothing those results with a B-spline scalar field estimate of the bias field.
- Author
- Nicholas J. Tustison
Contributed by Nicholas J. Tustison, James C. Gee in the Insight Journal paper: https://hdl.handle.net/10380/3053
- REFERENCE
J.G. Sled, A.P. Zijdenbos and A.C. Evans. "A Nonparametric Method for
Automatic Correction of Intensity Nonuniformity in Data" IEEE Transactions on Medical Imaging, Vol 17, No 1. Feb 1998.
N.J. Tustison, B.B. Avants, P.A. Cook, Y. Zheng, A. Egan, P.A. Yushkevich, and J.C. Gee. "N4ITK: Improved N3 Bias Correction" IEEE Transactions on Medical Imaging, 29(6):1310-1320, June 2010.
- See also
- itk::simple::N4BiasFieldCorrection for the procedural interface
-
itk::N4BiasFieldCorrectionImageFilter for the Doxygen on the original ITK class.
Definition at line 71 of file sitkN4BiasFieldCorrectionImageFilter.h.