[Insight-users] down sampling & Image registration
Luis Ibanez
luis.ibanez at kitware.com
Fri Jul 10 11:11:39 EDT 2009
Hi Wen,
Thanks for the clarification.
If the images look fine after visual inspection,
we probably can discard the sub-sampling from
the list of suspects.
It is more likely that the problem is in the
configuration of your image registration
process.
Tell us more about the registration:
What components are you using ?
1) Image modality ?
2) Transform ?
3) Optimizer ?
4) Metric ?
5) Interpolator ?
Have you connected an Observer to it ?
How many iterations is running ?
Does it produces any error messages ?
How are you initializing the Transform parameters ?
Have you set the OptimizerScales ?
If so, to what values ?
Thanks
Luis
------------------------------------------
On Fri, Jul 10, 2009 at 10:36 AM, kevin cavin <beibeiwen2003 at yahoo.com>wrote:
> Hello, Luis:
>
> I immdiate show the down sampling result after the down sampling . the
> images of the volume are just half smaller, which look good. I do not
> whether the bad registeration result come from low resolution of the
> volumes. Do you have any experiences with that ? Thanks !
>
> Kind regards
>
> Wen
>
>
>
>
> --- On *Fri, 7/10/09, Luis Ibanez <luis.ibanez at kitware.com>* wrote:
>
>
> From: Luis Ibanez <luis.ibanez at kitware.com>
> Subject: Re: [Insight-developers] down sampling
> To: "kevin cavin" <beibeiwen2003 at yahoo.com>
> Cc: Insight-developers at itk.org, "itk" <Insight-users at itk.org>
> Date: Friday, July 10, 2009, 10:07 PM
>
>
>
> Hi Kevin,
>
> Have you saved the images just after down-sampling
> and looked at them ?
>
>
> How do they look ?
>
>
> Please let us know,
>
>
> ------
>
> BTW: Please submit questions to the itk-users list.
> The Developers list is dedicated to discussions related
> to code added to ITK or modifications to ITK code.
>
>
> Thanks
>
>
> Luis
>
>
>
> ----------------------------------------------------------------------------------
> On Fri, Jul 10, 2009 at 9:19 AM, kevin cavin <beibeiwen2003 at yahoo.com<http://us.mc347.mail.yahoo.com/mc/compose?to=beibeiwen2003@yahoo.com>
> > wrote:
>
>> Hello,
>>
>> I am using Resamplefilter to downsampling my 3D volume in order to
>> register two volumes. Without downsampling and with less slices , I get two
>> volume registered. With downsampling, the registered result is non sense
>> (empty image). I am woderning where goes wrong? Maybe somepeople can help
>> me. Thanks!
>>
>> wen
>>
>> I attach part of code
>>
>> factorX = 2
>> factorY = 2
>> factorZ = 1
>> inputSpacing1 = windowing1.GetOutput().GetSpacing()
>> inputSpacing2 = windowing2.GetOutput().GetSpacing()
>> resampler1 =itk.ResampleImageFilter.IF3IF3.New()
>> resampler2 =itk.ResampleImageFilter.IF3IF3.New()
>> transform=itk.IdentityTransform.D3.New()
>> transform.SetIdentity()
>> resampler1.SetTransform( transform.GetPointer() )
>> resampler2.SetTransform( transform.GetPointer() )
>> interpolator1=itk.LinearInterpolateImageFunction.IF3D.New()
>> resampler1.SetInterpolator( interpolator1.GetPointer() )
>> resampler1.SetDefaultPixelValue( 0 )
>>
>> interpolator2=itk.LinearInterpolateImageFunction.IF3D.New()
>> resampler2.SetInterpolator( interpolator2.GetPointer() )
>> resampler2.SetDefaultPixelValue( 0 )
>>
>> spacing1=itk.Vector.D3()
>> spacing2=itk.Vector.D3()
>>
>> spacing1.SetElement(0,inputSpacing1.GetElement(0) * factorX)
>> spacing1.SetElement(1,inputSpacing1.GetElement(1) * factorY)
>> spacing1.SetElement(2,inputSpacing1.GetElement(2) * factorZ)
>> spacing2.SetElement(0,inputSpacing2.GetElement(0) * factorX)
>> spacing2.SetElement(1,inputSpacing2.GetElement(1) * factorY)
>> spacing2.SetElement(2,inputSpacing2.GetElement(2) * factorZ)
>>
>> resampler1.SetOutputSpacing( spacing1 )
>> resampler1.SetOutputOrigin( windowing1.GetOutput().GetOrigin() )
>> resampler1.SetOutputDirection( windowing1.GetOutput().GetDirection() )
>> resampler2.SetOutputSpacing( spacing2 )
>> resampler2.SetOutputOrigin( windowing2.GetOutput().GetOrigin() )
>> resampler2.SetOutputDirection( windowing2.GetOutput().GetDirection() )
>>
>> inputSize= windowing1.GetOutput().GetLargestPossibleRegion().GetSize()
>> print "X size : %f" % (inputSize.GetElement(0), )
>> print "Y size : %f" % (inputSize.GetElement(1), )
>> print "Z size : %f" % (inputSize.GetElement(2), )
>> size=itk.FixedArray.D3()
>> new_x=inputSize.GetElement(0)/factorX
>> new_y=inputSize.GetElement(1)/factorY
>> new_z=inputSize.GetElement(2)/factorZ
>>
>> inputSize.SetElement(0, int(new_x))
>> inputSize.SetElement(1, int(new_y))
>> inputSize.SetElement(2, int(new_z))
>> resampler1.SetSize( inputSize )
>> resampler1.SetInput( windowing1.GetOutput() )
>> resampler2.SetSize( inputSize )
>> resampler2.SetInput( windowing2.GetOutput() )
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> 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-developers
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090710/6f5e6660/attachment.htm>
More information about the Insight-users
mailing list