<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ES link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Dear users,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>I am using itkBSplineDeformableTransform type
deformation (three dimension and BSpline order is 3) to deform the points on a
vtkPolyData type mesh. But the program crashes when I call the method
TransformPoint() at one of the points. (I pasted the code from
itkBSplineDeformableTransform.txx below and underlined the related lines)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>template&lt;class
TScalarType, unsigned int NDimensions, unsigned int VSplineOrder&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>void <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>BSplineDeformableTransform&lt;TScalarType,
NDimensions,VSplineOrder&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>::TransformPoint( <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; const
InputPointType &amp; point, <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;
OutputPointType &amp; outputPoint, <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; WeightsType
&amp; weights, <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;
ParameterIndexArrayType &amp; indices,<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; bool&amp;
inside ) const<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; unsigned
int j;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; IndexType
supportIndex;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; InputPointType
transformedPoint;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; if (
m_BulkTransform )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
transformedPoint = m_BulkTransform-&gt;TransformPoint( point );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; else<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
transformedPoint = point;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; if (
m_CoefficientImage[0] )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><b><u><font size=1
face="Courier New"><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";
font-weight:bold'>&nbsp;&nbsp;&nbsp; ContinuousIndexType index;<o:p></o:p></span></font></u></b></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
for ( j = 0; j &lt; SpaceDimension; j++ )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
index[j] = ( point[j] - m_GridOrigin[j] ) / m_GridSpacing[j];<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
// NOTE: if the support region does not lie totally within the grid<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
// we assume zero displacement and return the input point<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><b><u><font size=1
face="Courier New"><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";
font-weight:bold'>&nbsp;&nbsp;&nbsp; inside = this-&gt;InsideValidRegion( index
);<o:p></o:p></span></font></u></b></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
if ( !inside )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
outputPoint = transformedPoint;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
// Compute interpolation weights<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
m_WeightsFunction-&gt;Evaluate( index, weights, supportIndex );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
// For each dimension, correlate coefficient with weights<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
RegionType supportRegion;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
supportRegion.SetSize( m_SupportSize );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
supportRegion.SetIndex( supportIndex );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
outputPoint.Fill( NumericTraits&lt;ScalarType&gt;::Zero );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
typedef ImageRegionConstIterator&lt;ImageType&gt; IteratorType;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
IteratorType m_Iterator[ SpaceDimension ];<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><b><u><font size=1
face="Courier New"><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";
font-weight:bold'>&nbsp;&nbsp;&nbsp; unsigned long counter = 0;<o:p></o:p></span></font></u></b></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
const PixelType * basePointer = m_CoefficientImage[0]-&gt;GetBufferPointer();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
for ( j = 0; j &lt; SpaceDimension; j++ )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
m_Iterator[j] = IteratorType( m_CoefficientImage[j],<b><u><span
style='font-weight:bold'> supportRegion </span></u></b>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><b><u><font size=1
face="Courier New"><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";
font-weight:bold'>&nbsp;&nbsp;&nbsp; while ( ! m_Iterator[0].IsAtEnd() )<o:p></o:p></span></font></u></b></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// multiply weigth with coefficient<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for ( j = 0; j &lt; SpaceDimension; j++ )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
outputPoint[j] += static_cast&lt;ScalarType&gt;( <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b><u><span style='font-weight:bold'>weights[counter]</span></u></b> *
m_Iterator[j].Get());<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// populate the indices array<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
indices[counter] = &amp;(m_Iterator[0].Value()) - basePointer;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// go to next coefficient in the support region<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><b><u><font size=1
face="Courier New"><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";
font-weight:bold'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++ counter;<o:p></o:p></span></font></u></b></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for ( j = 0; j &lt; SpaceDimension; j++ )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size=1 face="Courier New"><span style='font-size:9.0pt;
font-family:"Courier New"'>{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
++( m_Iterator[j] );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><b><u><font size=1
face="Courier New"><span style='font-size:9.0pt;font-family:"Courier New";
font-weight:bold'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></font></u></b></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; // return
results<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
for ( j = 0; j &lt; SpaceDimension; j++ )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
outputPoint[j] += transformedPoint[j];<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
else<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
itkWarningMacro( &lt;&lt; &quot;B-spline coefficients have not been set&quot;
);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
for ( j = 0; j &lt; SpaceDimension; j++ )<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size=1 face="Courier New"><span style='font-size:9.0pt;
font-family:"Courier New"'>{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
outputPoint[j] = transformedPoint[j];<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:9.0pt;
font-family:"Courier New"'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>The ContinuousIndex of the point is (4.80, 11.00,
2.97). And the m_ValidRegionLast (IndexType) is (11, 11, 11). Therefore, the
method InsideValidRegion() gives true (this is suppose to mean the support
region lies totally within the grid). The size of the supportRegion is known according
to the data dimension and BSpline order, which also determine the length of
weights (in my case is 64). The reason for the crashing is: for some unkown
reason, the while loop has been called more than 64 times, and this results in the
access violation of the weights, which is of size 64. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Is there anyone who knows what is happening there? <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Best,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Chong<o:p></o:p></span></font></p>

</div>

</body>

</html>