20 #ifndef MIRTK_ScalingAndSquaring_H 21 #define MIRTK_ScalingAndSquaring_H 23 #include "mirtk/Object.h" 24 #include "mirtk/GenericImage.h" 25 #include "mirtk/InterpolateImageFunction.h" 26 #include "mirtk/LinearInterpolateImageFunction.h" 27 #include "mirtk/FastCubicBSplineInterpolateImageFunction.h" 51 template <
class TReal>
79 mirtkPublicAggregateMacro(
const ImageType, InputVelocity);
82 mirtkPublicAggregateMacro(
const ImageType, InputDisplacement);
85 mirtkPublicAggregateMacro(
const ImageType, InputDeformation);
88 mirtkPublicAggregateMacro(
const ImageType, InputGradient);
94 mirtkReadOnlyAttributeMacro(UniquePtr<ImageType>, InterimDisplacement);
97 mirtkReadOnlyAttributeMacro(UniquePtr<ImageType>, InterimJacobian);
100 mirtkReadOnlyAttributeMacro(UniquePtr<ImageType>, InterimDetJacobian);
103 mirtkReadOnlyAttributeMacro(UniquePtr<ImageType>, InterimLogJacobian);
109 mirtkPublicAggregateMacro(ImageType, OutputDisplacement);
112 mirtkPublicAggregateMacro(ImageType, OutputDeformation);
115 mirtkPublicAggregateMacro(ImageType, OutputJacobian);
118 mirtkPublicAggregateMacro(ImageType, OutputDetJacobian);
121 mirtkPublicAggregateMacro(ImageType, OutputLogJacobian);
124 mirtkPublicAggregateMacro(ImageType, OutputGradient);
142 mirtkPublicAttributeMacro(
bool, ComputeInterpolationCoefficients);
150 mirtkPublicAttributeMacro(
bool, ComputeInverse);
153 mirtkPublicAttributeMacro(
double, UpperIntegrationLimit);
160 mirtkPublicAttributeMacro(
int, NumberOfSteps);
169 mirtkPublicAttributeMacro(
int, NumberOfSquaringSteps);
177 mirtkPublicAttributeMacro(
double, MaxScaledVelocity);
180 mirtkPublicAttributeMacro(
bool, Upsample);
185 mirtkPublicAttributeMacro(
bool, SmoothBeforeDownsampling);
210 void Resample(ImageType *, ImageType *,
bool =
false);
234 #endif // MIRTK_ScalingAndSquaring_H void FinalizeJacobian()
Finalize output Jacobian field.
GenericNearestNeighborExtrapolateImageFunction< ImageType > Extrapolator
Type of image extrapolation function.
void FinalizeDisplacement()
Finalize output displacement field.
ScalingAndSquaring()
Constructor.
void FinalizeLogJacobian()
Finalize log-transformed output Jacobian determinants.
GenericLinearInterpolateImageFunction< ImageType > VectorField
Type of vector field interpolator.
virtual void Finalize()
Finalize filter.
GenericImage< TReal > ImageType
Image type of input, output, and intermediate images.
void FinalizeDetJacobian()
Finalize output Jacobian determinants.
virtual ~ScalingAndSquaring()
Destructor.
GenericFastCubicBSplineInterpolateImageFunction< ImageType > VelocityField
Type of input velocity field interpolator.
virtual void Initialize()
Initialize filter.
virtual void Run()
Compute output deformation/displacement field and its derivatives.
void Resample(ImageType *, ImageType *, bool=false)
Resample intermediate filter output.