<div dir="ltr">Thanks Cory, I hvae just signed up. <br><br>Jothy<br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 3:45 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Jothy,<br>
<br>
The FFT based convolution filter is almost ready, but there are still<br>
a few failing tests I need to fix. Are you signed up on the gerrit<br>
review system (<a href="http://review.source.kitware.com" target="_blank">http://review.source.kitware.com</a>)? If not, feel free to<br>
sign up and I'll add you as a reviewer when I push the patch to gerrit<br>
for review.<br>
<br>
Thanks,<br>
<font color="#888888">Cory<br>
</font><div><div></div><div class="h5"><br>
On Fri, Sep 16, 2011 at 10:39 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
> Yes,I can switch to ITk4.0. Since my program is not dependent on ITK till<br>
> now.<br>
><br>
> (But I am more interested in the fft based convolution filters. If you have<br>
> your fft based filter codes I could test them with ITK4.0, before you push<br>
> it to git.)<br>
><br>
> Thanks<br>
><br>
> Jothy<br>
><br>
><br>
> On Fri, Sep 16, 2011 at 3:29 PM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>> wrote:<br>
>><br>
>> Jothy,<br>
>><br>
>> I understand that you are copying files from git to the 3.20 source.<br>
>> Is that correct? If so, that sounds dangerous to me, and my best<br>
>> advice to you is to stick with one version.<br>
>><br>
>> For what it's worth, the ConvolutionImageFilter tests are compiling<br>
>> fine within the current source in git on the compilers ITK supports,<br>
>> and the method giving you the error is being exercised by the tests.<br>
>> My guess is that there is a problem with mixing source between<br>
>> versions. There are many changes in git, and I wouldn't be surprised<br>
>> if doing what you are doing causes problems.<br>
>><br>
>> Would it be possible for you to switch completely to the source in git?<br>
>><br>
>> Thanks,<br>
>> Cory<br>
>><br>
>> On Fri, Sep 16, 2011 at 10:10 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
>> > Hi Cory,<br>
>> ><br>
>> > I use QtCreator, so the cmake lists is auomagically managed by qmake. In<br>
>> > fact I don't even know how to create cmakeLists.txt and I never<br>
>> > required<br>
>> > with QtCreator.<br>
>> ><br>
>> > I have managed to make a simple function as shown below.<br>
>> ><br>
>> > It converts 2 vtkImageData into itkImages, both are 3D. The conversion<br>
>> > works<br>
>> > pretty well and verified with old itkConvolutionImageFilter. Then I<br>
>> > convolve<br>
>> > with the latest filter. I copied all the necessary files from itk4.0 to<br>
>> > the<br>
>> > src folder such as itkDivideByConstantImageFilter,....<br>
>> ><br>
>> > Hope you will be able to manage with this<br>
>> ><br>
>> > #include"itkVTKImageToImageFilter.h"<br>
>> ><br>
>> > #include "itkImageToVTKImageFilter.h"<br>
>> ><br>
>> > #include"itkImage.h"<br>
>> ><br>
>> > #include"itkConvolutionImageFilter.h"<br>
>> ><br>
>> > #include"vtkImageData.h"<br>
>> ><br>
>> > #include"QDebug"<br>
>> ><br>
>> > void main(vtkImageData* input,vtkImageData* kernel)<br>
>> ><br>
>> > {<br>
>> ><br>
>> > //Convert input vtkImageData to itkImage<br>
>> ><br>
>> > typedef itk::Image<unsigned int,3> ImageType;<br>
>> ><br>
>> > typedef itk::VTKImageToImageFilter<ImageType>VTKImageToImageType;<br>
>> ><br>
>> > VTKImageToImageType::Pointer converter=VTKImageToImageType::New();<br>
>> ><br>
>> > converter->SetInput(input->GetOutput());<br>
>> ><br>
>> > converter->Update();<br>
>> ><br>
>> > //Convert kernel vtkImageData to itkImage<br>
>> ><br>
>> > typedef itk::Image<unsigned int,3> ImageTypeKernel;<br>
>> ><br>
>> > typedef<br>
>> > itk::VTKImageToImageFilter<ImageTypeKernel>VTKImageToImageTypeKernel;<br>
>> ><br>
>> > VTKImageToImageTypeKernel::Pointer<br>
>> > converterKernel=VTKImageToImageTypeKernel::New();<br>
>> ><br>
>> > converterKernel->SetInput(kernel);<br>
>> ><br>
>> > converterKernel->Update();<br>
>> ><br>
>> > //Crashes while executing htis<br>
>> ><br>
>> > qDebug()<<"Convolving....";<br>
>> ><br>
>> > typedef itk::ConvolutionImageFilter<ImageType> ConvolutionFilterType;<br>
>> ><br>
>> > ConvolutionFilterType::Pointer convoluter= ConvolutionFilterType::New();<br>
>> ><br>
>> > convoluter->SetInput(converter->GetOutput());<br>
>> ><br>
>> > convoluter->SetImageKernelInput(converterKernel->GetOutput());<br>
>> ><br>
>> > //convoluter->SetOutputRegionModeToSame();<br>
>> ><br>
>> > convoluter->Update();<br>
>> ><br>
>> > qDebug()<<"Convolving done....";<br>
>> ><br>
>> ><br>
>> > }<br>
>> ><br>
>> > Thanks<br>
>> ><br>
>> > Jothy<br>
>> ><br>
>> ><br>
>> > On Fri, Sep 16, 2011 at 2:23 PM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Jothy,<br>
>> >><br>
>> >> Could you post a minimal compilable and runnable example with an<br>
>> >> accompanying CMakeLists.txt file that gives the compilation error?<br>
>> >><br>
>> >> Thanks,<br>
>> >> Cory<br>
>> >><br>
>> >> On Fri, Sep 16, 2011 at 7:39 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
>> >> > Hi all,<br>
>> >> ><br>
>> >> > I am trying to use the itkConvolutionImageFilter from git (since some<br>
>> >> > of<br>
>> >> > the<br>
>> >> > bugs are fixed in this). i was able to sucessfully use the older<br>
>> >> > version<br>
>> >> > of<br>
>> >> > this downloaded from the Insight journal. But I get the following<br>
>> >> > errors<br>
>> >> > with the git version.<br>
>> >> ><br>
>> >> > In file included from ..\BIOSIM2\/itkConvolutionImageFilter.h:197,<br>
>> >> ><br>
>> >> > from ..\BIOSIM2\myimagefilters.cpp:48:<br>
>> >> ><br>
>> >> > ..\BIOSIM2\/itkConvolutionImageFilter.hxx: In member function<br>
>> >> > 'typename<br>
>> >> > itk::ConvolutionImageFilter<TInputImage, TKernelImage,<br>
>> >> > TOutputImage>::OutputRegionType<br>
>> >> > itk::ConvolutionImageFilter<TInputImage,<br>
>> >> > TKernelImage, TOutputImage>::GetValidRegion() const [with TInputImage<br>
>> >> > =<br>
>> >> > itk::Image<unsigned int, 3u>, TKernelImage = itk::Image<unsigned int,<br>
>> >> > 3u>,<br>
>> >> > TOutputImage = itk::Image<unsigned int, 3u>]':<br>
>> >> ><br>
>> >> > ..\BIOSIM2\/itkConvolutionImageFilter.hxx:200: instantiated from<br>
>> >> > 'void<br>
>> >> > itk::ConvolutionImageFilter<TInputImage, TKernelImage,<br>
>> >> > TOutputImage>::GenerateOutputInformation() [with TInputImage =<br>
>> >> > itk::Image<unsigned int, 3u>, TKernelImage = itk::Image<unsigned int,<br>
>> >> > 3u>,<br>
>> >> > TOutputImage = itk::Image<unsigned int, 3u>]'<br>
>> >> ><br>
>> >> > ..\BIOSIM2\myimagefilters.cpp:494: instantiated from here<br>
>> >> ><br>
>> >> > ..\BIOSIM2\/itkConvolutionImageFilter.hxx:267: error: passing 'const<br>
>> >> > itk::ConvolutionImageFilter<itk::Image<unsigned int, 3u>,<br>
>> >> > itk::Image<unsigned int, 3u>, itk::Image<unsigned int, 3u> >' as<br>
>> >> > 'this'<br>
>> >> > argument of 'const TInputImage* itk::ImageToImageFilter<TInputImage,<br>
>> >> > TOutputImage>::GetInput() [with TInputImage = itk::Image<unsigned<br>
>> >> > int,<br>
>> >> > 3u>,<br>
>> >> > TOutputImage = itk::Image<unsigned int, 3u>]' discards qualifiers<br>
>> >> ><br>
>> >> > And here is the code I use to convolve<br>
>> >> ><br>
>> >> > typedef itk::ConvolutionImageFilter<ImageType> ConvolutionFilterType;<br>
>> >> ><br>
>> >> > ConvolutionFilterType::Pointer convoluter=<br>
>> >> > ConvolutionFilterType::New();<br>
>> >> ><br>
>> >> > convoluter->SetInput(converter->GetOutput());<br>
>> >> ><br>
>> >> > convoluter->SetImageKernelInput(converterKernel->GetOutput());<br>
>> >> ><br>
>> >> > convoluter->Update();<br>
>> >> ><br>
>> >> ><br>
>> >> > Any hints<br>
>> >> ><br>
>> >> > Jothy<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > Jothybasu K Selvaraj<br>
>> >> > PhD Student<br>
>> >> > University of Liverpool<br>
>> >> > Liverpool,UK<br>
>> >> ><br>
>> >> ><br>
>> >> > _____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>
>> >> ><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Cory Quammen<br>
>> >> Research Associate<br>
>> >> Department of Computer Science<br>
>> >> The University of North Carolina at Chapel Hill<br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Jothybasu K Selvaraj<br>
>> > PhD Student<br>
>> > University of Liverpool<br>
>> > Liverpool,UK<br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Cory Quammen<br>
>> Research Associate<br>
>> Department of Computer Science<br>
>> The University of North Carolina at Chapel Hill<br>
><br>
><br>
><br>
> --<br>
> Jothybasu K Selvaraj<br>
> PhD Student<br>
> University of Liverpool<br>
> Liverpool,UK<br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothybasu K Selvaraj<br>PhD Student<br>University of Liverpool<br>Liverpool,UK<br></div><br>
</div>