<DIV>hi everyone,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Still trying to write my own filter ... :-) </DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is my main function of my filter CorrelationCoefficientsImageFilter:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><EM>template &lt;class TInputImage, class TOutputImage&gt;<BR>void CorrelationCoefficientsImageFilter&lt;TInputImage, TOutputImage&gt;<BR>::GenerateData()<BR>{<BR>&nbsp; this-&gt;AllocateOutputs();</EM></STRONG></DIV>
<DIV><STRONG><EM></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM>&nbsp; //composite filters<BR>&nbsp; typedef VnlFFTRealToComplexConjugateImageFilter&lt;TInputImage::PixelType,InputImageDimension&gt; FFTFilterType;<BR>&nbsp; typedef FFTFilterType::OutputImageType ComplexImageType;<BR>&nbsp; typedef MultiplyComplexImageFilter&lt;FFTFilterType::OutputImageType, FFTFilterType::OutputImageType, FFTFilterType::OutputImageType&gt; MultiplyComplexImageFilter;<BR>&nbsp; typedef VnlFFTComplexConjugateToRealImageFilter&lt; TInputImage::PixelType,InputImageDimension &gt; IFFTFilterType;<BR>&nbsp;<BR>&nbsp; typename FFTFilterType::Pointer fftFilter1 = FFTFilterType::New();<BR>&nbsp; typename FFTFilterType::Pointer fftFilter2 = FFTFilterType::New();<BR>&nbsp; typename MultiplyComplexImageFilter::Pointer multiplyFilter = MultiplyComplexImageFilter::New();<BR>&nbsp; typename IFFTFilterType::Pointer ifftFilter = IFFTFilterType::New();</EM></STRONG></DIV>
<DIV><STRONG><EM></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM>&nbsp; // get pointers to the inputs<BR>&nbsp; Input1ImagePointer inputPtr1<BR>&nbsp;&nbsp;&nbsp; = const_cast&lt; TInputImage*&gt;( this-&gt;GetInput(0) );</EM></STRONG></DIV>
<DIV><STRONG><EM>&nbsp; Input2ImagePointer inputPtr2<BR>&nbsp;&nbsp;&nbsp; = const_cast&lt; TInputImage*&gt;( this-&gt;GetInput(1) );<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;fftFilter1-&gt;SetInput( inputPtr1);<BR>&nbsp; fftFilter2-&gt;SetInput( inputPtr2);</EM></STRONG></DIV>
<DIV><STRONG><EM>&nbsp; multiplyFilter-&gt;SetInput1( fftFilter1-&gt;GetOutput() );<BR>&nbsp; multiplyFilter-&gt;SetInput2( fftFilter2-&gt;GetOutput() );<BR>&nbsp; <BR>&nbsp; ifftFilter-&gt;SetInput(multiplyFilter-&gt;GetOutput());</EM></STRONG></DIV>
<DIV><STRONG><EM>&nbsp; ifftFilter-&gt;GraftOutput(this-&gt;GetOutput());<BR>&nbsp; <BR>&nbsp; ifftFilter-&gt;Update();</EM></STRONG></DIV>
<DIV><STRONG><EM>&nbsp; this-&gt;GraftOutput(ifftFilter-&gt;GetOutput());</EM></STRONG></DIV>
<DIV><STRONG><EM>&nbsp; // Set up the progress reporter <BR>&nbsp; ProgressReporter progress(this, 0, this-&gt;GetOutput()-&gt;GetRequestedRegion().GetNumberOfPixels());<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; // iterator for output image<BR>&nbsp; typedef ImageRegionConstIteratorType&lt; TOutputImage &gt; OutputConstIteratorType;<BR>&nbsp; OutputConstIteratorType outputIt( this-&gt;GetOutput(), this-&gt;GetOutput()-&gt;GetRequestedRegion() );<BR>&nbsp; outputIt.GoToBegin();<BR>&nbsp; while( !outputIt.IsAtEnd() ) <BR>&nbsp; {<BR>&nbsp;fprintf(fp, "%f\n", outputIt.Get());<BR>&nbsp;++outputIt;<BR>&nbsp;progress.CompletedPixel(); // potential exception thrown here<BR>&nbsp; }</EM></STRONG></DIV>
<DIV><STRONG><EM>}</EM></STRONG></DIV>
<DIV><STRONG><EM></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM>-</EM></STRONG> However. when I build my project, there is a fatal error at calling of this filter. Here is how I call it: </DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><STRONG><EM>&nbsp;typedef itk::CorrelationCoefficientsImageFilter&lt;ImageType, ImageType&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CorrelationCoefficientsImageFilterType;<BR>&nbsp;CorrelationCoefficientsImageFilterType::Pointer corrFilter =&nbsp; CorrelationCoefficientsImageFilterType::New();<BR>&nbsp; corrFilter-&gt;SetInput1(image1);<BR>&nbsp; corrFilter-&gt;SetInput2(image2);<BR>&nbsp; corrFilter-&gt;Update();</EM></STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>And this is the error I get: </DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>&nbsp;error C2955: 'MultiplyComplexImageFilter' : use of class template requires template argument list<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; itkMultiplyComplexImageFilter.h(69) : see declaration of 'MultiplyComplexImageFilter'</STRONG></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV>- that is so strange because, when I execute the same procedure outside a mini-pipeline,I got no error and everything works fine. Maybe, there is something wrong with the declaration of my types in my own filter, don't you think? Any idea to give me? </DIV>
<DIV>&nbsp;</DIV>
<DIV>Isabelle</DIV></DIV>
<DIV>&nbsp;</DIV><p>
                <hr size=1> 
<b><font color=#FF0000>Appel audio GRATUIT</font> partout dans le monde</b> avec le nouveau Yahoo! Messenger<br> 
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>