ITK
5.2.0
Insight Toolkit
|
#include <itkDisplacementFieldJacobianDeterminantFilter.h>
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static void | SetGlobalDefaultDirectionTolerance (double) |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static double | GetGlobalDefaultCoordinateTolerance () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
static constexpr unsigned int | VectorDimension = InputPixelType::Dimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
using | WeightsType = FixedArray< TRealType, ImageDimension > |
using | ImageBaseType = typename InputImageType::Superclass |
WeightsType | m_DerivativeWeights |
WeightsType | m_HalfDerivativeWeights |
bool | m_UseImageSpacing |
ThreadIdType | m_RequestedNumberOfThreads |
ImageBaseType::ConstPointer | m_RealValuedInputImage |
RadiusType | m_NeighborhoodRadius |
void | SetUseImageSpacing (bool) |
virtual bool | GetUseImageSpacing () const |
virtual void | UseImageSpacingOn () |
virtual void | UseImageSpacingOff () |
void | SetDerivativeWeights (const WeightsType &) |
virtual const WeightsType & | GetDerivativeWeights () const |
DisplacementFieldJacobianDeterminantFilter () | |
~DisplacementFieldJacobianDeterminantFilter () override=default | |
void | BeforeThreadedGenerateData () override |
void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) override |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual const ImageBaseType * | GetRealValuedInputImage () const |
virtual const RadiusType & | GetNeighborhoodRadius () const |
virtual void | SetNeighborhoodRadius (RadiusType _arg) |
virtual TRealType | EvaluateAtNeighborhood (const ConstNeighborhoodIteratorType &it) const |
Computes a scalar image from a vector image (e.g., deformation field) input, where each output scalar at each pixel is the Jacobian determinant of the vector field at that location. This calculation is correct in the case where the vector image is a "displacement" from the current location. The computation for the jacobian determinant is: det[ dT/dx ] = det[ I + du/dx ].
Note that the determinant of a zero vector field is also zero, whereas the Jacobian determinant of the corresponding identity warp transformation is 1.0. In order to compute the effective deformation Jacobian determinant 1.0 must be added to the diagonal elements of Jacobian prior to taking the derivative. i.e. det([ (1.0+dx/dx) dx/dy dx/dz ; dy/dx (1.0+dy/dy) dy/dz; dz/dx dz/dy (1.0+dz/dz) ])
The second template parameter, TRealType, can be optionally specified to define the scalar numerical type used in calculations. This is the component type of the output image, which will be of itk::Vector<TRealType, N>, where N is the number of channels in the multiple component input image. The default type of TRealType is float. For extra precision, you may safely change this parameter to double.
The third template parameter is the output image type. The third parameter will be automatically constructed from the first and second parameters, so it is not necessary (or advisable) to set this parameter explicitly. Given an M-channel input image with dimensionality N, and a numerical type specified as TRealType, the output image will be of type itk::Image<TRealType, N>.
Weights can be applied to the derivatives directly using the SetDerivativeWeights method. Note that if UseImageSpacing is set to TRUE (ON), then these weights will be overridden by weights derived from the image spacing when the filter is updated. The argument to this method is a C array of TRealValue type.
Currently, dimensions up to and including 4 are supported. This limitation comes from the presence of vnl_det() functions for matrices of dimension up to 4x4.
The template parameter TRealType must be floating point (float or double) or a user-defined "real" numerical type with arithmetic operations defined sufficient to compute derivatives.
Definition at line 114 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::ConstNeighborhoodIteratorType = ConstNeighborhoodIterator<RealVectorImageType> |
Type of the iterator that will be used to move through the image. Also the type which will be passed to the evaluate function
Definition at line 156 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 124 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
protected |
The weights used to scale partial derivatives during processing
Definition at line 246 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 140 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::InputImageType = TInputImage |
Image type alias support
Definition at line 138 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::InputPixelType = typename TInputImage::PixelType |
Definition at line 135 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 141 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::OutputImageRegionType = typename Superclass::OutputImageRegionType |
Superclass type alias.
Definition at line 160 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 139 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::OutputPixelType = typename TOutputImage::PixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 134 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 123 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::RadiusType = typename ConstNeighborhoodIteratorType::RadiusType |
Definition at line 157 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::RealType = TRealType |
Define the data type and the vector of data type used in calculations.
Definition at line 150 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::RealVectorImageType = Image<RealVectorType, TInputImage::ImageDimension> |
Definition at line 152 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::RealVectorType = Vector<TRealType, InputPixelType::Dimension> |
Definition at line 151 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::Self = DisplacementFieldJacobianDeterminantFilter |
Standard class type aliases.
Definition at line 121 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::Superclass = ImageToImageFilter<TInputImage, TOutputImage> |
Definition at line 122 of file itkDisplacementFieldJacobianDeterminantFilter.h.
using itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::WeightsType = FixedArray<TRealType, ImageDimension> |
The weights used to scale partial derivatives during processing
Definition at line 208 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
protected |
The weights used to scale partial derivatives during processing
|
overrideprotecteddefault |
The weights used to scale partial derivatives during processing
|
overrideprotectedvirtual |
Do any necessary casting/copying of the input data. Input pixel types whose value types are not real number types must be cast to real number types.
Reimplemented from itk::ImageSource< TOutputImage >.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
overrideprotectedvirtual |
DisplacementFieldJacobianDeterminantFilter can be implemented as a multithreaded filter (we're only using vnl_det(), which is trivially thread safe). Therefore, this implementation provides a DynamicThreadedGenerateData() routine which is called for each processing thread. The output image data is allocated automatically by the superclass prior to calling DynamicThreadedGenerateData(). DynamicThreadedGenerateData can only write to the portion of the output image specified by the parameter "outputRegionForThread"
Reimplemented from itk::ImageSource< TOutputImage >.
|
protectedvirtual |
The weights used to scale partial derivatives during processing
|
overridevirtual |
DisplacementFieldJacobianDeterminantFilter needs a larger input requested region than the output requested region (larger by the kernel size to calculate derivatives). As such, DisplacementFieldJacobianDeterminantFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
The weights used to scale partial derivatives during processing
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
protectedvirtual |
Get/Set the neighborhood radius used for gradient computation
|
protectedvirtual |
Get access to the input image casted as real pixel values
|
virtual |
The weights used to scale partial derivatives during processing
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
The weights used to scale partial derivatives during processing
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
void itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::SetDerivativeWeights | ( | const WeightsType & | ) |
Directly Set/Get the array of weights used in the gradient calculations. Note that calling UseImageSpacingOn will clobber these values.
|
protectedvirtual |
The weights used to scale partial derivatives during processing
void itk::DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >::SetUseImageSpacing | ( | bool | ) |
Set/Get whether or not the filter will use the spacing of the input image (1/spacing) in the calculation of the Jacobian determinant. Use On to compute the Jacobian determinant in the space in which the data was acquired; use Off to reset the derivative weights, ignore the image spacing, and to compute the Jacobian determinant in the image space. Default is On.
|
virtual |
The weights used to scale partial derivatives during processing
|
virtual |
The weights used to scale partial derivatives during processing
|
staticconstexpr |
The dimensionality of the input and output images.
Definition at line 144 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
protected |
The weights used to scale partial derivatives during processing
Definition at line 260 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
protected |
Pre-compute 0.5*m_DerivativeWeights since that is the only thing used in the computations.
Definition at line 264 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
private |
The weights used to scale partial derivatives during processing
Definition at line 273 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
private |
The weights used to scale partial derivatives during processing
Definition at line 271 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
private |
The weights used to scale partial derivatives during processing
Definition at line 269 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
private |
The weights used to scale partial derivatives during processing
Definition at line 267 of file itkDisplacementFieldJacobianDeterminantFilter.h.
|
staticconstexpr |
Length of the vector pixel type of the input image.
Definition at line 147 of file itkDisplacementFieldJacobianDeterminantFilter.h.