<div dir="ltr">Hey Brad,<div><br></div><div style>The same errors with 3D, 2D and 1D.</div><div style><br></div><div style>Cheers,</div><div style>Phil</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 22 April 2013 22:56, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Do you get the same error with just a 3D image?<br>
<br>
Brad<br>
<div><div class="h5"><br>
On Apr 21, 2013, at 11:02 PM, Phillip George Dayan Ward <<a href="mailto:pgwar1@student.monash.edu">pgwar1@student.monash.edu</a>> wrote:<br>
<br>
> Hey ITK,<br>
><br>
> I'm attempting to use the convolution filter, on a complex image, with a complex kernel. Both the kernel and image have 4 dimensions.<br>
><br>
> I feel like I either missed a warning saying complex type is not supported, or I have failed to implement it properly.<br>
><br>
> I'm receiving the following error during the compile process just from instantiating the filter with the type std::complex<float><br>
><br>
> ITK/Modules/Core/Common/include/itkPixelTraits.h:49:60: error: no member<br>
> named 'Length' in 'std::complex<double>'<br>
> itkStaticConstMacro(Dimension, unsigned int, TPixelType::Length);<br>
><br>
> I'm also receiving:<br>
><br>
> ITK/Modules/Core/Common/include/itkPixelTraits.h:52:32: error: no type named<br>
> 'ValueType' in 'std::complex<double>'<br>
> typedef typename TPixelType::ValueType ValueType;<br>
><br>
> ITK/Modules/Core/Common/include/itkNeighborhoodInnerProduct.hxx:52:7: error:<br>
> cannot convert 'const std::complex<double>' to 'OutputPixelValueType' (aka 'double') without a conversion<br>
> operator<br>
> static_cast< OutputPixelValueType >( *o_it ) *<br>
><br>
> ITK/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx:288:51: error:<br>
> invalid operands to binary expression ('RealType' (aka 'complex<double>') and 'int')<br>
> / ( static_cast< RealType >( count ) - 1 );<br>
><br>
> ITK/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx:329:16: error:<br>
> invalid operands to binary expression ('PixelType' (aka 'std::complex<double>') and 'PixelType')<br>
> if ( value > max )<br>
><br>
> code:<br>
> typedef itk::Image< std::complex<double>, 4> ComplexImageType;<br>
><br>
> ComplexImageType::RegionType region;<br>
> region.SetSize(0,15);<br>
> region.SetSize(1,30);<br>
> region.SetSize(2,100);<br>
> region.SetSize(3,100);<br>
><br>
> ComplexImageType::RegionType kernelRegion;<br>
> kernelRegion.SetSize(0,1);<br>
> kernelRegion.SetSize(1,30);<br>
> kernelRegion.SetSize(2,100);<br>
> kernelRegion.SetSize(3,100);<br>
><br>
> ComplexImageType::Pointer image = ComplexImageType::New();<br>
> image->SetRegions(region);<br>
> image->Allocate();<br>
> image->FillBuffer(std::complex<double>(1.0,1.0));<br>
><br>
> ComplexImageType::Pointer kernel = ComplexImageType::New();<br>
> kernel->SetRegions(kernelRegion);<br>
> kernel->Allocate();<br>
> kernel->FillBuffer(std::complex<double>(1.0,1.0));<br>
><br>
> typedef itk::ConvolutionImageFilter<ComplexImageType> ConvolutionFilterType;<br>
> ConvolutionFilterType::Pointer convolutionFilter = ConvolutionFilterType::New();<br>
> convolutionFilter->SetInput(image);<br>
> convolutionFilter->SetKernelImage(kernel);<br>
> convolutionFilter->Update();<br>
><br>
> Cheers,<br>
> Phil<br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
</blockquote></div><br></div>