STIR  6.2.0
Public Member Functions | List of all members
stir::MaximalArrayFilter3D< elemT > Class Template Reference

Implements erosion on 3D arrays. More...

#include "stir/MaximalArrayFilter3D.h"

Inheritance diagram for stir::MaximalArrayFilter3D< elemT >:
Inheritance graph
[legend]

Public Member Functions

 MaximalArrayFilter3D (const Coordinate3D< int > &mask_radius)
 
bool is_trivial () const override
 Should return true when the operations won't modify the object at all. More...
 
- Public Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< 3, elemT >
void operator() (Array< num_dimensions, elemT > &array) const override
 in-place modification of array, implemented inline
 
void operator() (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override
 result stored in another array More...
 
- Public Member Functions inherited from stir::ArrayFunctionObject< num_dimensions, elemT >
virtual Succeeded get_influencing_indices (IndexRange< num_dimensions > &influencing_indices, const IndexRange< num_dimensions > &output_indices) const
 sets the range of indices that influences the result in a set of coordinates output_indices More...
 
virtual Succeeded get_influenced_indices (IndexRange< num_dimensions > &influenced_indices, const IndexRange< num_dimensions > &input_indices) const
 sets the range of indices that gets influenced by a set of coordinate input_indices More...
 

Additional Inherited Members

- Protected Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< 3, elemT >
virtual void do_it (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const=0
 

Detailed Description

template<typename elemT>
class stir::MaximalArrayFilter3D< elemT >

Implements erosion on 3D arrays.

The minimum value for a 1D array of 2n+1 elements is defined as the minimum element of the sorted array.

For 3D images, the current filter works by extracting all neigbours (given by the mask) to a 1D array, and getting the maximal of that array.

This implementation of the maximal filter handles edges by taking the minimum of all available pixels. For instance, when a 3x3 mask is used, and the pixel-to-be-filtered is at the left edge, there will be only 6 pixels in the mask (instead of 9).

Todo:

Currently, the mask is determined in terms of the mask radius (in pixels), where size = 2*radius+1. This could easily be relaxed.

generalise to n-dimensions

Member Function Documentation

◆ is_trivial()

template<typename elemT >
bool stir::MaximalArrayFilter3D< elemT >::is_trivial ( ) const
overridevirtual

Should return true when the operations won't modify the object at all.

For the 2 argument version, elements in out_array will be set to corresponding elements in in_array. Elements in out_array that do not occur in in_array will be set to 0.

Implements stir::ArrayFunctionObject< num_dimensions, elemT >.


The documentation for this class was generated from the following files: