<HTML><HEAD></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Hi</DIV>
<DIV> </DIV>
<DIV>Try to produce small example that we can debug it and check where is
problem</DIV>
<DIV> </DIV>
<DIV>for small example see this</DIV>
<DIV> </DIV>
<DIV><A
href="http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ResampleImageFilter"><FONT
face="Times New Roman">http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ResampleImageFilter</FONT></A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=curiale@gmail.com
href="mailto:curiale@gmail.com">Ariel Hernán Curiale</A> </DIV>
<DIV><B>Sent:</B> Tuesday, October 02, 2012 5:04 PM</DIV>
<DIV><B>To:</B> <A title=alexdowson@hotmail.com
href="mailto:alexdowson@hotmail.com">alex Dowson</A> </DIV>
<DIV><B>Cc:</B> <A title=notinmyhead@gmail.com
href="mailto:notinmyhead@gmail.com">Alessandro</A> ; <A
title=insight-users@itk.org href="mailto:insight-users@itk.org">Insight User</A>
</DIV>
<DIV><B>Subject:</B> Re: [Insight-users] ResamplingFilter
problem</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">I
forgot to say that I use the interpolator only in the registration and the
registration modified my transform which is a BSplineTransform.
<DIV>
<DIV> </DIV>
<DIV><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV>
<DIV
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal">
<DIV
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal">Saludos</DIV>
<DIV
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal">__________________________________<BR><FONT
class=Apple-style-span color=#b7bfc5>|</FONT> Ariel Hernán Curiale Ph.D
Student<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT> ETSI
Telecomunicación<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT>
Universidad de Valladolid<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT>
Campus Miguel Delibes<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT>
47011 Valladolid, Spain<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT>
Phone: 983-423000 ext. 5590</DIV>
<DIV><FONT
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"
class=Apple-style-span color=#b7b7b7>|</FONT> Web: <A
href="http://www.curiale.com.ar/"><FONT class=Apple-style-span
color=#084ebe>www.curiale.com.ar</FONT></A><BR><FONT
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"
class=Apple-style-span color=#b7b7b7>|</FONT><SPAN
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal"
class=Apple-style-span>_________________________________</SPAN></DIV></DIV></DIV></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></SPAN></DIV>
<DIV> </DIV>
<DIV>
<DIV>El 02/10/2012, a las 13:25, Ariel Hernán Curiale escribió:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">Hi,
<DIV>I'm using this code and works ok for me:</DIV>
<DIV> </DIV>
<DIV>
<DIV>typedef itk::InterpolateImageFunction< MovingImageType,double>
InterpolatorType;</DIV>
<DIV>typename InterpolatorType::Pointer interpolator;</DIV>
<DIV> </DIV>
<DIV>.....</DIV>
<DIV>.....</DIV>
<DIV> </DIV>
<DIV>interpolator = BsplineInterpolatorType::New(); //Generic interpolator
type</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN></DIV>
<DIV>typedef BsplineInterpolatorType
*
InterpolatorPointer;</DIV>
<DIV>InterpolatorPointer int_aux = dynamic_cast<
InterpolatorPointer>(interpolator.GetPointer());</DIV>
<DIV>int_aux->SetSplineOrder(3);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>typedef itk::ResampleImageFilter<FixedImageType,MovingImageType
>ResampleFilterType;</DIV>
<DIV> </DIV>
<DIV>typename ResampleFilterType::Pointer resample_grid =
ResampleFilterType::New();</DIV>
<DIV> </DIV>
<DIV>resampleGridImages.push_back(resample_grid);</DIV>
<DIV> </DIV>
<DIV>resample_grid->SetTransform( transform );</DIV>
<DIV>resample_grid->SetInput( gridImage );</DIV>
<DIV> </DIV>
<DIV>resample_grid->SetSize(
fixedImage->GetLargestPossibleRegion().GetSize() );</DIV>
<DIV>resample_grid->SetOutputOrigin( fixedImage->GetOrigin()
);</DIV>
<DIV>resample_grid->SetOutputSpacing( fixedImage->GetSpacing() );</DIV>
<DIV>resample_grid->SetOutputDirection( fixedImage->GetDirection()
);</DIV>
<DIV>resample_grid->SetDefaultPixelValue( 100 );</DIV>
<DIV>resample_grid->Update();</DIV></DIV>
<DIV> </DIV>
<DIV>
<DIV> </DIV>
<DIV apple-content-edited="true">
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; FONT-VARIANT: normal; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV>
<DIV
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal">
<DIV
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal">Saludos</DIV>
<DIV
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; COLOR: rgb(0,0,0); FONT-SIZE: medium; FONT-WEIGHT: normal">__________________________________<BR><FONT
class=Apple-style-span color=#b7bfc5>|</FONT> Ariel Hernán Curiale Ph.D
Student<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT> ETSI
Telecomunicación<BR><FONT class=Apple-style-span color=#b7bfc5>|</FONT>
Universidad de Valladolid<BR><FONT class=Apple-style-span
color=#b7bfc5>|</FONT> Campus Miguel Delibes<BR><FONT class=Apple-style-span
color=#b7bfc5>|</FONT> 47011 Valladolid, Spain<BR><FONT class=Apple-style-span
color=#b7bfc5>|</FONT> Phone: 983-423000 ext. 5590</DIV>
<DIV><FONT
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"
class=Apple-style-span color=#b7b7b7>|</FONT> Web: <A
href="http://www.curiale.com.ar/"><FONT class=Apple-style-span
color=#084ebe>www.curiale.com.ar</FONT></A><BR><FONT
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"
class=Apple-style-span color=#b7b7b7>|</FONT><SPAN
style="FONT-STYLE: normal; FONT-FAMILY: helvetica; FONT-SIZE: medium; FONT-WEIGHT: normal"
class=Apple-style-span>_________________________________</SPAN></DIV></DIV></DIV></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></SPAN></DIV></DIV></DIV>
<DIV> </DIV>
<DIV>
<DIV>El 02/10/2012, a las 12:47, alex Dowson escribió:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV><BR><BR>Hi<BR><BR>You didn’t set the Transformation anywhere. Can you
show me code again with correction .<BR><BR><BR>-----Original Message-----
From: Alessandro<BR>Sent: Tuesday, October 02, 2012 4:15 PM<BR>To: Insight
User<BR>Subject: Re: [Insight-users] ResamplingFilter
problem<BR><BR>Hi,<BR><BR>I tried but still nothing seems to come
out...<BR><BR>Ale<BR><BR>Il giorno 02/ott/2012, alle ore 12.39, alex Dowson
ha scritto:<BR><BR>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Hi<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Try calling the resample->Update() before the
resample->GetOutput()<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">-----Original Message----- From:
Alessandro<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Sent: Tuesday, October 02, 2012 4:07
PM<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">To: Insight User<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Subject: [Insight-users] ResamplingFilter
problem<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Hello,<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">I tried to Resample a 3d Slice Volume using a
reference image. I wrote the following function (inside a class) to
perform the task:<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">ImageVolumeType::Pointer
VolumeRetriever::applyResamplingFromImage (ImageVolumeType::Pointer img,
ImageVolumeType::Pointer ref) {<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">typedef itk::IdentityTransform<double, 3>
TransformType;<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">typedef
itk::ResampleImageFilter<ImageVolumeType, ImageVolumeType>
ResampleImageFilterType;<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">ResampleImageFilterType::Pointer resample =
ResampleImageFilterType::New();<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">resample->SetInput(img);<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">resample->UseReferenceImageOn();<BR></BLOCKQUOTE>
<BLOCKQUOTE
type="cite">resample->SetReferenceImage(ref);<BR></BLOCKQUOTE>
<BLOCKQUOTE
type="cite">resample->UpdateLargestPossibleRegion();<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">return resample->GetOutput();<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">}<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">where ImageVolumeType is typedef
itk::Image< InputPixelType, 3 > ImageVolumeType;<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Problem is: when I run it the return is a NULL
pointer...<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">What am I missing?<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Thanks,<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Ale<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE
type="cite">_____________________________________<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Powered by <A
href="http://www.kitware.com/">www.kitware.com</A><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Visit other Kitware open-source projects
at<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><A
href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Kitware offers ITK Training Courses, for more
information visit:<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><A
href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</A><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Please keep messages on-topic and check the ITK
FAQ at:<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><A
href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">Follow this link to
subscribe/unsubscribe:<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><A
href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR></BLOCKQUOTE><BR>_____________________________________<BR>Powered
by <A href="http://www.kitware.com/">www.kitware.com</A><BR><BR>Visit other
Kitware open-source projects at<BR><A
href="http://www.kitware.com/opensource/opensource.html">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">http://www.kitware.com/products/protraining.php</A><BR><BR>Please
keep messages on-topic and check the ITK FAQ
at:<BR>http://www.itk.org/Wiki/ITK_FAQ<BR><BR>Follow this link to
subscribe/unsubscribe:<BR>http://www.itk.org/mailman/listinfo/insight-users
<BR>_____________________________________<BR>Powered by
www.kitware.com<BR><BR>Visit other Kitware open-source projects
at<BR>http://www.kitware.com/opensource/opensource.html<BR><BR>Kitware
offers ITK Training Courses, for more information
visit:<BR>http://www.kitware.com/products/protraining.php<BR><BR>Please keep
messages on-topic and check the ITK FAQ
at:<BR>http://www.itk.org/Wiki/ITK_FAQ<BR><BR>Follow this link to
subscribe/unsubscribe:<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></BODY></HTML>