<DIV>hi everyone,</DIV>
<DIV> </DIV>
<DIV>Still trying to write my own filter ... :-) </DIV>
<DIV> </DIV>
<DIV>Here is my main function of my filter CorrelationCoefficientsImageFilter:</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><STRONG><EM>template <class TInputImage, class TOutputImage><BR>void CorrelationCoefficientsImageFilter<TInputImage, TOutputImage><BR>::GenerateData()<BR>{<BR> this->AllocateOutputs();</EM></STRONG></DIV>
<DIV><STRONG><EM></EM></STRONG> </DIV>
<DIV><STRONG><EM> //composite filters<BR> typedef VnlFFTRealToComplexConjugateImageFilter<TInputImage::PixelType,InputImageDimension> FFTFilterType;<BR> typedef FFTFilterType::OutputImageType ComplexImageType;<BR> typedef MultiplyComplexImageFilter<FFTFilterType::OutputImageType, FFTFilterType::OutputImageType, FFTFilterType::OutputImageType> MultiplyComplexImageFilter;<BR> typedef VnlFFTComplexConjugateToRealImageFilter< TInputImage::PixelType,InputImageDimension > IFFTFilterType;<BR> <BR> typename FFTFilterType::Pointer fftFilter1 = FFTFilterType::New();<BR> typename FFTFilterType::Pointer fftFilter2 = FFTFilterType::New();<BR> typename MultiplyComplexImageFilter::Pointer multiplyFilter = MultiplyComplexImageFilter::New();<BR> typename IFFTFilterType::Pointer ifftFilter = IFFTFilterType::New();</EM></STRONG></DIV>
<DIV><STRONG><EM></EM></STRONG> </DIV>
<DIV><STRONG><EM> // get pointers to the inputs<BR> Input1ImagePointer inputPtr1<BR> = const_cast< TInputImage*>( this->GetInput(0) );</EM></STRONG></DIV>
<DIV><STRONG><EM> Input2ImagePointer inputPtr2<BR> = const_cast< TInputImage*>( this->GetInput(1) );<BR> <BR> fftFilter1->SetInput( inputPtr1);<BR> fftFilter2->SetInput( inputPtr2);</EM></STRONG></DIV>
<DIV><STRONG><EM> multiplyFilter->SetInput1( fftFilter1->GetOutput() );<BR> multiplyFilter->SetInput2( fftFilter2->GetOutput() );<BR> <BR> ifftFilter->SetInput(multiplyFilter->GetOutput());</EM></STRONG></DIV>
<DIV><STRONG><EM> ifftFilter->GraftOutput(this->GetOutput());<BR> <BR> ifftFilter->Update();</EM></STRONG></DIV>
<DIV><STRONG><EM> this->GraftOutput(ifftFilter->GetOutput());</EM></STRONG></DIV>
<DIV><STRONG><EM> // Set up the progress reporter <BR> ProgressReporter progress(this, 0, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels());<BR> <BR> // iterator for output image<BR> typedef ImageRegionConstIteratorType< TOutputImage > OutputConstIteratorType;<BR> OutputConstIteratorType outputIt( this->GetOutput(), this->GetOutput()->GetRequestedRegion() );<BR> outputIt.GoToBegin();<BR> while( !outputIt.IsAtEnd() ) <BR> {<BR> fprintf(fp, "%f\n", outputIt.Get());<BR> ++outputIt;<BR> progress.CompletedPixel(); // potential exception thrown here<BR> }</EM></STRONG></DIV>
<DIV><STRONG><EM>}</EM></STRONG></DIV>
<DIV><STRONG><EM></EM></STRONG> </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> </DIV>
<DIV>
<DIV><STRONG><EM> typedef itk::CorrelationCoefficientsImageFilter<ImageType, ImageType><BR> CorrelationCoefficientsImageFilterType;<BR> CorrelationCoefficientsImageFilterType::Pointer corrFilter = CorrelationCoefficientsImageFilterType::New();<BR> corrFilter->SetInput1(image1);<BR> corrFilter->SetInput2(image2);<BR> corrFilter->Update();</EM></STRONG></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>And this is the error I get: </DIV>
<DIV> </DIV>
<DIV><STRONG> error C2955: 'MultiplyComplexImageFilter' : use of class template requires template argument list<BR> itkMultiplyComplexImageFilter.h(69) : see declaration of 'MultiplyComplexImageFilter'</STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV><STRONG></STRONG> </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> </DIV>
<DIV>Isabelle</DIV></DIV>
<DIV> </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>