21 #ifndef _MIRTKBIASCORRECTION_H 23 #define _MIRTKBIASCORRECTION_H 25 #include "mirtk/Image.h" 27 #include "mirtk/Resampling.h" 29 #include "mirtk/Transformation.h" 31 #include "mirtk/BiasField.h" 35 class BiasCorrection :
public Object
37 mirtkObjectMacro(BiasCorrection);
43 RealImage *_reference;
49 BiasField *_biasfield;
55 virtual void Initialize();
58 virtual void Finalize();
66 virtual ~BiasCorrection();
69 virtual void SetInput (RealImage *, RealImage *);
72 virtual void SetWeights (RealImage *);
75 virtual void SetOutput(BiasField *);
77 virtual void SetMask( ByteImage *);
83 virtual void Apply(RealImage &);
86 virtual void ApplyToImage(RealImage &);
89 virtual void ApplyToImage(GreyImage &);
92 virtual void SetPadding(
short Padding);
93 virtual short GetPadding();
97 inline void BiasCorrection::SetInput(RealImage *target, RealImage *reference)
100 _reference = reference;
103 inline void BiasCorrection::SetWeights(RealImage *weights)
108 inline void BiasCorrection::SetOutput(BiasField *biasfield)
110 _biasfield = biasfield;
113 inline void BiasCorrection::SetPadding(
short Padding)
117 inline short BiasCorrection::GetPadding(){