Dears,<br><br>May be that's a fool question, but I'm not so familiar with templates and my searches are returned not useful.<br><br>Well, I'm trying to give some type at a template function and use them to define the image type. My method are:<br><br>template <typename T><br>void MyFilter::processImage(T)<br>{<br> if(!m_ImageData) return;<br> // defines the type<br> typedef T PixelType;<br> typedef itk::Image<T, 3> ImageData;<br> ImageData::Pointer m_Image = ImageData::New();<br> typedef itk::ImageToVTKImageFilter< ImageData > ToVTKConverter;<br> typedef itk::VTKImageToImageFilter< ImageData > ToITKConverter;<br> typedef itk::BinaryThresholdImageFilter<ImageData, ImageData> FilterType;<br> ToVTKConverter::Pointer m_toVTKConverter =
ToVTKConverter::New();<br> ToITKConverter::Pointer m_toITKConverter = ToITKConverter::New();<br> FilterType::Pointer m_Filter = FilterType::New();<br>.<br>.<br>and so on...<br>}<br><br>My compiler just returns:<br>MyFilter.cpp:78: error: expected `;' before ‘a’<br>MyFilter.cpp:82: error: expected `;' before ‘m_toVTKConverter’<br>MyFilter.cpp:83: error: expected `;' before ‘m_toITKConverter’<br>MyFilter.cpp:84: error: expected `;' before ‘m_Filter’<br><br>This method are inside a NOT template class, and I'm trying to solve the various pixel types that's are encountered in DICOM images without conversion, just instantiate the filter and runs them.<br><br>Sorry by this newbie question,<br>but I'll appreciate any help from yours.<br><br>Thanks in advance,<br><br>Wagner Sales<br><br><p> __________________________________________________<br>Fale com seus amigos de graça com o novo Yahoo! Messenger
<br>http://br.messenger.yahoo.com/