<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I try to show a vtkImageData slice by slice as following
code:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>vtkImageReader reader<BR> reader
SetDataByteOrderToLittleEndian<BR> reader SetDataExtent 0 63 0 63 1
64<BR> reader SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/quarter"<BR>
reader SetDataMask 0x7fff<BR> reader SetDataSpacing 1.6 1.6
1.5</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>vtkImageViewer2 viewer<BR>viewer SetInput [reader
GetOutput]<BR>viewer SetColorWindow 1200<BR>viewer SetColorLevel 1000<BR>viewer
SetZSlice 40</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>viewer Render<BR></FONT></DIV>
<DIV><FONT size=2>but I can't get correct result when I change the
parameter of SetZSlice</FONT></DIV>
<DIV><FONT size=2>vtkImageViewer2 always display the same
slice.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>When i change vtkImageViewer2 to vtkImageViewer, the
result is correct.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>The result is the same for vtk4.0 and vtk4.2.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Why? </FONT><FONT size=2>help me,
thanks.</DIV></FONT></BODY></HTML>