<DIV>Hi, </DIV>
<DIV>I have a vtkImageData representing a volume. I want to</DIV>
<DIV>display the image of a single slice.</DIV>
<DIV>However, once I set my volume to a vtkImageReslice, the</DIV>
<DIV>vtkImageReslice output parameters are not the same as its</DIV>
<DIV>input...in fact, the SetInput does not seem to have any effect...</DIV>
<DIV>Here is how I do it...</DIV>
<DIV> </DIV>
<DIV>vtkImageData* volume = vtkImageData::New();</DIV>
<DIV> volume->SetScalarTypeToFloat();</DIV>
<DIV> volume->SetDimensions(74, 25, 8);</DIV>
<DIV> volume->AllocateScalars();</DIV>
<DIV> volume->SetSpacing(2, 2, 2.5);</DIV>
<DIV> volume->SetOrigin(0, 0, 0);</DIV>
<DIV> </DIV>
<DIV>float* data = (float*)(volume->GetScalarPointer());</DIV>
<DIV>memcpy(data, source_data; 74 * 25 * 8 * sizeof(float));</DIV>
<DIV> </DIV>
<DIV>vtkImageReslice* slice = vtkImageSlice::New();</DIV>
<DIV> slice->SetInput(volume);</DIV>
<DIV> </DIV>
<DIV>int d1[3];</DIV>
<DIV>volume->GetDimensions(d);</DIV>
<DIV>int d2[3];</DIV>
<DIV>slice->GetOutput()->GetDimensions(d);</DIV>
<DIV> </DIV>
<DIV>d should be the same in both cases rigth???</DIV>
<DIV>It is always good in the volume but 0 in the slice</DIV>
<DIV>output...Any idea why???</DIV>
<DIV> </DIV>
<DIV>Your help would really be appreciated...</DIV>
<DIV>Thanx!</DIV>
<DIV> </DIV>
<DIV>MAthieu</DIV><p><br><hr size=1>Post your free ad now! <a href="http://ca.personals.yahoo.com/"><b>Yahoo! Canada Personals</b></a><br>