<div>Hi,</div>
<div> </div>
<div>I am working with FixedPointVolumeRayCast and it seems to me that there is a mistake in the helper macros when incrementing the ray position.</div>
<div><font size="2"></font> </div>
<div><font size="2">for example:</font></div>
<div>#define VTKKWRCHelper_MoveToNextSampleNN() \<br> if ( k < numSteps-1 ) \<br> { \
<br> mapper->FixedPointIncrement( pos, dir ); \<br> mapper->ShiftVectorDown( pos, spos ); \<br> dptr = data + spos[0]*inc[0] + spos[1]*inc[1] + spos[2]*inc[2]; \
<br> }</div>
<div> </div>
<div> </div>
<div>is called in <font size="2">FixedPointCompositeHelperGenerateImageOneSimpleNN</font></div>
<div><font size="2"></font> </div>
<div><font size="2">for( k=0; k<numSteps; ++k)</font></div>
<div><font size="2">{</font></div>
<div><font size="2"> if( k )</font></div>
<div><font size="2"> {</font></div>
<div> VTKKWRCHelper_MoveToNextSampleNN();</div>
<div> }</div>
<div> </div>
<div> // the rest of the loop computes the color value</div>
<div> ...</div>
<div>}</div>
<div> </div>
<div> </div>
<div>so if we have 3 steps in the ray, when k == 0 we compute the first sample value,</div>
<div>then k == 1 we move to second sample and compute the value,</div>
<div>and then k == 2 and instead of moving to third sample we stay at the same position and recompute the previous value.</div>
<div> </div>
<div>I think the condition in the macro should be:</div>
<div>if ( k < numSteps )</div>
<div> </div>
<div>for all the VTKKWRCHelper_MoveToNextSample*** macros</div>
<div> </div>
<div> </div>
<div> </div>
<div>Is this true or am i missing something?</div>
<div> </div>
<div> </div>
<div>XR.</div>
<div> </div>