[ITK-users] simpleitk image casting?

Robert.Atwood at diamond.ac.uk Robert.Atwood at diamond.ac.uk
Tue May 20 11:34:36 EDT 2014


What I expected? Pretty much like what you describe except I was thinking the result of the gradient on a 2-d image was a 3-d image of (NxMx2) and that I would slice the array then compose it, but I didn't know that it was a vector image or which filter to use extracting the IndexSelection filter, so your answer has undoubtedly solved the problem.

However if simpleITK doesn't have a complex-to-complex FFT it won't actually handle the whole algorithm that way! 



Estimation of sub-pixel motion using
gradient cross-correlation
V Argyriou and T. Vlachos
ELECTRONICS LETTERS 26th June 2003 Vol. 39 No. 13



Robust Fourier-Based Image Alignment with Gradient Complex Image
Hong-Ren Su ; Shang-Hong Lai ; Ya-Hui Tsai
2010 International Conference on Pattern Recognition
1051-4651/10 DOI 10.1109/ICPR.2010.582



> -----Original Message-----
> From: Bradley Lowekamp [mailto:blowekamp at mail.nih.gov]
> Sent: 20 May 2014 02:20
> To: Atwood, Robert (DLSLtd,RAL,SCI)
> Cc: insight-users at itk.org
> Subject: Re: [ITK-users] simpleitk image casting?
> 
> Hello,
> 
> Glad to hear it working for you.
> 
> To extract a component from an SimpleITK Image with Vector Pixel you
> you can use the lengthly name VectorIndexSelection cast filter[1].
> 
> And then to compose can use the RealAndImaginaryToComplex[2] filter2.
> 
> There are many ways that this could be done. How did you expect it to
> be in SimpleITK?
> 
> Brad
> 
> 
> [1]
> http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1VectorIn
> dexSelectionCastImageFilter.html
> [2]
> http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1RealAndI
> maginaryToComplexImageFilter.html
> On May 19, 2014, at 1:25 PM, Robert.Atwood at diamond.ac.uk wrote:
> 
> > Hi,
> > I have just discovered the iPython + simpleITK combination and may
> > very well reduce a lot of barriers to the general use of ITK here by
> > virtue of being 'simple' and working very well with NumPy
> >
> >
> > However, I was just trying to implement a relatively simple algorithm
> previously programmed not using ITK at all .. in this I require the
> results of the gradient filter interpreted such that the horizontal
> gradient is the real part of a complex number and the vertical gradient
> is the imaginary part. I cannot figure out a 'simple' way to do this,
> can this be done within sitk or must I extrac the array , manipulate it
> in Numpy , and load it back as an  (complex) image?  Then the script is
> much less 'simple'!
> >
> > Thanks in advance
> > A SimpleITK convert !
> >
> > Robert
> >
> >
> >
> >
> > --
> > This e-mail and any attachments may contain confidential, copyright
> and or privileged material, and are for the use of the intended
> addressee only. If you are not the intended addressee or an authorised
> recipient of the addressee please notify us of receipt by returning the
> e-mail and do not use, copy, retain, distribute or disclose the
> information in or attached to the e-mail.
> > Any opinions expressed within this e-mail are those of the individual
> and not necessarily of Diamond Light Source Ltd.
> > Diamond Light Source Ltd. cannot guarantee that this e-mail or any
> attachments are free from viruses and we cannot accept liability for
> any damage which you may sustain as a result of software viruses which
> may be transmitted in or with the message.
> > Diamond Light Source Limited (company no. 4375679). Registered in
> > England and Wales with its registered office at Diamond House,
> Harwell
> > Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United
> > Kingdom
> >
> >
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users


-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 





More information about the Insight-users mailing list