SMIL  1.0.4
MorphImageFunctionBase< T_in, T_out > Class Template Reference

Base morpho operator class. More...

Detailed Description

template<class T_in, class T_out = T_in>
class smil::MorphImageFunctionBase< T_in, T_out >

Base morpho operator class.

Example

from smilPython import *
class myMeanMorphoFunction(MorphImageFunctionBase_UINT8):
def processPixel(self, i, relOffList):
pixSum = 0.
for nb in relOffList:
pixSum += self.imageIn[i + nb]
self.imageOut[i] = int(pixSum / len(relOffList))
imIn = Image("https://smil.cmm.minesparis.psl.eu/images/lena.png")
imOut = Image(imIn)
func = myMeanMorphoFunction()
func(imIn, imOut)
imOut.show()

#include <DMorphImageOperations.hpp>

+ Inheritance diagram for MorphImageFunctionBase< T_in, T_out >:
+ Collaboration diagram for MorphImageFunctionBase< T_in, T_out >:

Public Types

typedef Image< T_in > imageInType
 
typedef ImDtTypes< T_in >::lineType lineInType
 
typedef ImDtTypes< T_in >::sliceType sliceInType
 
typedef ImDtTypes< T_in >::volType volInType
 
typedef Image< T_out > imageOutType
 
typedef ImDtTypes< T_out >::lineType lineOutType
 
typedef ImDtTypes< T_out >::sliceType sliceOutType
 
typedef ImDtTypes< T_out >::volType volOutType
 
- Public Types inherited from imageFunctionBase< T_in >
typedef Image< T_in > imageType
 
typedef imageType::sliceType sliceType
 
typedef imageType::lineType lineType
 
typedef imageType::pixelType pixelType
 

Public Member Functions

 MorphImageFunctionBase (T_in _borderValue=ImDtTypes< T_in >::min(), T_out _initialValue=ImDtTypes< T_out >::min())
 
RES_T operator() (const imageInType &imIn, imageOutType &imOut, const StrElt &se=DEFAULT_SE)
 
RES_T operator() (const imageInType &imIn, const StrElt &se=DEFAULT_SE)
 
virtual RES_T initialize (const imageInType &imIn, imageOutType &imOut, const StrElt &se)
 
virtual RES_T finalize (const imageInType &imIn, imageOutType &imOut, const StrElt &se)
 
virtual RES_T _exec (const imageInType &imIn, imageOutType &imOut, const StrElt &se)
 
virtual RES_T _exec (const imageInType &imIn, const StrElt &se)
 
virtual RES_T processImage (const imageInType &imIn, imageOutType &imOut, const StrElt &se)
 
virtual void processSlice (sliceInType linesIn, sliceOutType linesOut, size_t &lineNbr, const StrElt &se)
 
virtual void processLine (lineInType pixIn, lineOutType pixOut, size_t &pixNbr, const StrElt &se)
 
virtual void processPixel (size_t pointOffset, vector< int > &dOffsets)
 
virtual void processPixel (IntPoint &point, vector< IntPoint > &dOffsets)
 
- Public Member Functions inherited from imageFunctionBase< T_in >
lineType * createAlignedBuffers (size_t nbr, size_t len)
 
void deleteAlignedBuffers ()
 
void copyLineToBuffer (T_in *line, size_t bufIndex)
 
void copyBufferToLine (size_t bufIndex, T_in *line)
 
 operator RES_T ()
 

Static Public Member Functions

static bool isInplaceSafe (const StrElt &)
 

Public Attributes

const Image< T_in > * imageIn
 
Image< T_out > * imageOut
 
T_out initialValue
 
T_in borderValue
 
- Public Attributes inherited from imageFunctionBase< T_in >
sliceType alignedBuffers
 
size_t bufferNumber
 
size_t bufferLength
 
size_t bufferSize
 
RES_T retVal
 

Protected Attributes

size_t imSize [3]
 
volInType slicesIn
 
volOutType slicesOut
 
lineInType pixelsIn
 
lineOutType pixelsOut
 
vector< IntPointsePoints
 
UINT sePointNbr
 
vector< int > relativeOffsets
 
int se_xmin
 
int se_xmax
 
int se_ymin
 
int se_ymax
 
int se_zmin
 
int se_zmax
 
bool oddSe
 

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