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

Implements erosion on 3D arrays. More...

#include "stir/MinimalArrayFilter3D.h"

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

Public Member Functions

 MinimalArrayFilter3D (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::MinimalArrayFilter3D< 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 minimal of that array.

This implementation of the minimal 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::MinimalArrayFilter3D< 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: