[Insight-users] NeighborhoodOperator

Joshua Cates cates at sci.utah.edu
Thu Sep 1 20:04:07 EDT 2005


Hi Franz,

There are, in fact, no such methods as GenerateScalarCoefficients() and 
ScalarFill().  The documentation is in error.  You should implement the methods 
GenerateCoefficients() and Fill() instead.

There is no requirement that the neighborhood operator be directional. 
GenerateCoefficients() takes no input and returns a vector of the coefficients 
used in your operator.  Fill() takes that vector of coefficients as the argument 
and positions them spatially in the operator (which is, itself, a neighborhood 
data structure).

For example, if you simply wanted to sum all of the values in a neighborhood, 
your GenerateCoefficients() method would return the vector
{1,1,1,1, ..., 1}.  The Fill() method would simply copy those values into the 
operator.

Hope this helps,

Josh.

l franz wrote:
> Hi everybody,
> 
> I want to create a neighborhood operator which inherits of 
> "NeighborhoodOperator" class. My operator will weight each pixels of a 
> NDimensional neighborhood through a kind of inner product (the output of 
> this inner product will be a neighborhood with weighted pixels). So my 
> operator performs on all the neighborhood (and not in a particular 
> direction) and its size is equal to the neighborhood size.
> 
> So, my operator is not directional. In this case and if I understand 
> well the documentation, I have to implement two methods:
> 1. GenerateScalarCoefficients
> 2. ScalarFill
> 
> So, I don't need to implement the "GenerateCoefficients" and "Fill" 
> methods (for directional operators) like in GaussianOperator or in 
> DerivativeOperator.
> 
> But, I don't know how to create the "GenerateScalarCoefficients" and 
> "ScalarFill" methods. What do they have in input arguments? What do they 
> return? Do they have to call a particular method inherited from 
> NeighborhoodOperator??
> 
> I think that "GenerateScalarCoefficient" method is similar to 
> "GenerateCoefficients" method. It takes no input argument and return a 
> "CoefficientVector" with the desired coefficients.
> But I have no ideas of how to implement the "ScalarFill" method.
> 
> Does someone know about it? Or does anybody know where I can find an 
> exemple of an non-directional neighborhood operator??
> 
> Thanks,
> Cheers,
> 
> Franz
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

-- 
Josh Cates
SCI Institute / School of Computing
University of Utah
801-595-9165
http:/www.sci.utah.edu/~cates


More information about the Insight-users mailing list