#include <itkBlockMatchingStrainWindowDisplacementCalculator.h>
Displacements outside a strain window are interpolated by surrounding displacements.
This class acts a filter to remove 'peak-hopping' artifacts in the displacement.
This class does not directly calculate displacement, but relies on another MetricImageToDisplacementCalculator to first calculate the displacements. Then, the resulting displacements are filtered. Points whose strain values lie outside the MaximumAbsStrain are interpolated by surrounding displacements or extrapolated using the nearest strain value if possible.
The filter is templated over the MetricImage (for superclass, not used), displacement image type, and strain image component value type.
The filter can be applied iteratively to remove regions of high strain with SetMaximumIterations().
Definition at line 58 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
Inheritance diagram for itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >:
Collaboration diagram for itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >:Public Member Functions | |
| void | Compute () override |
| virtual::itk::LightObject::Pointer | CreateAnother () const |
| virtual unsigned int | GetCurrentIteration () const |
| virtual const Superclass * | GetDisplacementCalculator () const |
| virtual const StrainTensorType & | GetMaximumAbsStrain () const |
| virtual unsigned int | GetMaximumIterations () const |
| virtual const char * | GetNameOfClass () const |
| virtual const StrainImageFilterType * | GetStrainImageFilter () const |
| virtual void | SetDisplacementCalculator (Superclass *_arg) |
| void | SetDisplacementImage (DisplacementImageType *image) override |
| virtual void | SetMaximumAbsStrain (const StrainTensorType &max) |
| virtual void | SetMaximumIterations (unsigned int _arg) |
| void | SetMetricImagePixel (const PointType &point, const IndexType &index, MetricImageType *image) override |
| virtual void | SetStrainImageFilter (StrainImageFilterType *_arg) |
Public Member Functions inherited from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage > | |
| virtual void | CacheMetricImageOff () |
| virtual void | CacheMetricImageOn () |
| virtual bool | GetCacheMetricImage () const |
| virtual const CenterPointsImageType * | GetCenterPointsImage () const |
| const DisplacementImageType * | GetDisplacementImage () const |
| virtual const MetricImageImageType * | GetMetricImageImage () const |
| virtual void | ModifyEnlargeOutputRequestedRegion (DataObject *data) |
| virtual void | ModifyGenerateInputRequestedRegion (RegionType ®ion) |
| virtual void | SetCacheMetricImage (bool _arg) |
| virtual void | SetCenterPointsImage (CenterPointsImageType *_arg) |
| virtual void | SetMetricImageImage (MetricImageImageType *_arg) |
Public Member Functions inherited from itk::Object | |
| unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
| unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
| virtual void | DebugOff () const |
| virtual void | DebugOn () const |
| Command * | GetCommand (unsigned long tag) |
| bool | GetDebug () const |
| MetaDataDictionary & | GetMetaDataDictionary () |
| const MetaDataDictionary & | GetMetaDataDictionary () const |
| virtual ModifiedTimeType | GetMTime () const |
| virtual const TimeStamp & | GetTimeStamp () const |
| bool | HasObserver (const EventObject &event) const |
| void | InvokeEvent (const EventObject &) |
| void | InvokeEvent (const EventObject &) const |
| virtual void | Modified () const |
| void | Register () const override |
| void | RemoveAllObservers () |
| void | RemoveObserver (unsigned long tag) const |
| void | SetDebug (bool debugFlag) const |
| void | SetReferenceCount (int) override |
| void | UnRegister () const noexcept override |
| void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
| void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
| virtual void | SetObjectName (std::string _arg) |
| virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
| Pointer | Clone () const |
| virtual void | Delete () |
| virtual int | GetReferenceCount () const |
| void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
| static Pointer | New () |
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 = TDisplacementImage::ImageDimension |
Static Public Attributes inherited from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage > | |
| static constexpr unsigned int | ImageDimension = TDisplacementImage::ImageDimension |
Protected Types | |
| using | AbsFilterType = AbsImageFilter<NthElementAdaptorType, MetricImageType> |
| using | BoxMeanImageFilterType = BoxMeanImageFilter<MetricImageType, MetricImageType> |
| using | MaskType = Image<bool, ImageDimension> |
| using | NthElementAdaptorType = NthElementImageAdaptor<StrainImageType, MetricPixelType> |
Protected Types inherited from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage > | |
| using | MetricImageDuplicatorType = ImageDuplicator<MetricImageType> |
Protected Member Functions | |
| unsigned long long | GenerateMask (const RegionType ®ion) |
| void | ReplaceDisplacements (const RegionType ®ion) |
| StrainWindowDisplacementCalculator () | |
Protected Member Functions inherited from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage > | |
| MetricImageToDisplacementCalculator () | |
Protected Member Functions inherited from itk::Object | |
| Object () | |
| bool | PrintObservers (std::ostream &os, Indent indent) const |
| void | PrintSelf (std::ostream &os, Indent indent) const override |
| virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
| ~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
| virtual LightObject::Pointer | InternalClone () const |
| LightObject () | |
| virtual void | PrintHeader (std::ostream &os, Indent indent) const |
| virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
| virtual | ~LightObject () |
|
protected |
Definition at line 175 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 181 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::ConstPointer = SmartPointer<const Self> |
Definition at line 71 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::DisplacementImageType = typename Superclass::DisplacementImageType |
Definition at line 79 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::IndexType = typename Superclass::IndexType |
Definition at line 94 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 169 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::MetricImageType = typename Superclass::MetricImageType |
Definition at line 95 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::MetricPixelType = typename MetricImageType::PixelType |
Definition at line 96 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 172 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::Pointer = SmartPointer<Self> |
Definition at line 70 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::PointType = typename Superclass::PointType |
Definition at line 93 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::RegionType = typename DisplacementImageType::RegionType |
Definition at line 80 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::Self = StrainWindowDisplacementCalculator |
Standard class type alias.
Definition at line 68 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::StrainImageFilterType |
Definition at line 82 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::StrainImageType = typename StrainImageFilterType::OutputImageType |
Definition at line 86 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::StrainTensorType = typename StrainImageFilterType::OutputImagePixelType |
Definition at line 85 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
| using itk::BlockMatching::StrainWindowDisplacementCalculator< TMetricImage, TDisplacementImage, TStrainValueType >::Superclass = MetricImageToDisplacementCalculator<TMetricImage, TDisplacementImage> |
Definition at line 69 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
|
overridevirtual |
Subclasses must implement this method. If the displacement calculation takes place in SetMetricImagePixel(), then this can do nothing.
Implements itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage >.
|
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.
|
protected |
Determine the values outside the strain window, and set the internal mask image to true if the value needs to be replaced. Return the number of values outside the strain window.
|
virtual |
Get the current or last iteration of the algorithm. Starts from 1. See also SetMaximumIterations().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage >.
|
virtual |
|
static |
Method for creation through the object factory.
|
protected |
Replace the displacements where the mask is true.
|
virtual |
Set/Get the internal displacement calculator that is used to calculate the displacements after regularization. Defaults to a MaximumPixelDisplacementCalcultor.
|
inlineoverridevirtual |
Set/Get the displacement image. Get should only be called after calling Compute() and all the metric image pixels have been set.
Reimplemented from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage >.
Definition at line 99 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
inlinevirtual |
Set/Get the maxmimum absolute strain allowed. If any of strain components are below the values in this tensor, the displacement is interpolated or extrapolated by surrounding values.
Definition at line 126 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
virtual |
Set/Get the maximum iterations the algorithm is applied. The algorithm will be applied repeatedly until the number of strain pixels outside the specified window converges or this value is reached. Defaults to 1.
|
overridevirtual |
Set a metric image pixel. This is the way to supply input to this class. The point is the center point of the corresponding fixed block. The index is the index of the corresponding displacement image pixel. The metric image may or may not be stored in the class's MetricImageImage depending on the needs of the implementation and whether SetCacheMetricImageOn() has been set.
Reimplemented from itk::BlockMatching::MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage >.
|
virtual |
Set/Get the strain image filter that is used to calculate the strain image. This defaults to an itk::StrainImageFilter.
|
staticconstexpr |
ImageDimension enumeration.
Definition at line 65 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 176 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 182 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 166 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 159 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 170 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 164 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 167 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 163 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 173 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.
|
protected |
Definition at line 161 of file itkBlockMatchingStrainWindowDisplacementCalculator.h.