<br><br><div><span class="gmail_quote">On 9/2/05, <b class="gmail_sendername">Joshua Cates</b> <<a href="mailto:cates@sci.utah.edu">cates@sci.utah.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Franz,<br><br>There are, in fact, no such methods as GenerateScalarCoefficients() and<br>ScalarFill(). The documentation is in error. You should implement the methods<br>GenerateCoefficients() and Fill() instead.<br>
<br>There is no requirement that the neighborhood operator be directional.<br>GenerateCoefficients() takes no input and returns a vector of the coefficients<br>used in your operator. Fill() takes that vector of coefficients as the argument
<br>and positions them spatially in the operator (which is, itself, a neighborhood<br>data structure).<br><br>For example, if you simply wanted to sum all of the values in a neighborhood,<br>your GenerateCoefficients() method would return the vector
<br>{1,1,1,1, ..., 1}. The Fill() method would simply copy those values into the<br>operator.<br><br>Hope this helps,<br><br>Josh.<br><br>l franz wrote:<br>> Hi everybody,<br>><br>> I want to create a neighborhood operator which inherits of
<br>> "NeighborhoodOperator" class. My operator will weight each pixels of a<br>> NDimensional neighborhood through a kind of inner product (the output of<br>> this inner product will be a neighborhood with weighted pixels). So my
<br>> operator performs on all the neighborhood (and not in a particular<br>> direction) and its size is equal to the neighborhood size.<br>><br>> So, my operator is not directional. In this case and if I understand
<br>> well the documentation, I have to implement two methods:<br>> 1. GenerateScalarCoefficients<br>> 2. ScalarFill<br>><br>> So, I don't need to implement the "GenerateCoefficients" and "Fill"
<br>> methods (for directional operators) like in GaussianOperator or in<br>> DerivativeOperator.<br>><br>> But, I don't know how to create the "GenerateScalarCoefficients" and<br>> "ScalarFill" methods. What do they have in input arguments? What do they
<br>> return? Do they have to call a particular method inherited from<br>> NeighborhoodOperator??<br>><br>> I think that "GenerateScalarCoefficient" method is similar to<br>> "GenerateCoefficients" method. It takes no input argument and return a
<br>> "CoefficientVector" with the desired coefficients.<br>> But I have no ideas of how to implement the "ScalarFill" method.<br>><br>> Does someone know about it? Or does anybody know where I can find an
<br>> exemple of an non-directional neighborhood operator??<br>><br>> Thanks,<br>> Cheers,<br>><br>> Franz<br>><br>><br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> Insight-users mailing list<br>> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users">
http://www.itk.org/mailman/listinfo/insight-users</a><br><br>--<br>Josh Cates<br>SCI Institute / School of Computing<br>University of Utah<br>801-595-9165<br>http:/www.sci.utah.edu/~cates</blockquote><div><br>
<br>
Thanks for your help Josh. That light me a lot.<br>
<br>
But I still have a little question. I have implemented a
"GenerateCoefficients()" and Fill()" methods. If I take in exemple the
way a directional operator (Gaussian or Derivative Operator) is used,
the coefficients are computed when the "CreateDirectional()" method is
called. This last method is inherited form the "NeighborhoodOperator"
class.<br>
<br>
In fact, the "CreateDirectional()" method will call the
"GenerateCoefficients()" and "Fill()" method that have been
implemented. But this "CreateDirectional()" method needs the
"m_Direction" variable (see NeighborhoodOperator.txx line 64). This
last variable can be set by the "SetDirection(unsigned int)" method.<br>
<br>
In my case, I don't have a directional operator. So it's not representative to set a direction.<br>
<br>
So, have I the obligation to use the "CreateDirectional()" method to
generate the coefficients? Or perhaps another method (perhaps
"CreateToRadius" method).<br>
<br>
And if I have to use the "CreateDirectional()" method, what would the
direction to set? Can I simply "forget" to set the direction? (I think
no...)<br>
<br>
Thanks for your help,<br>
<br>
Cheers,<br>
<br>
Franz </div><br></div><br>