<!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.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2> I use vtkExtractVOI to extract a image,code as
follows:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>vtkVolume16Reader
*reader=vtkVolume16Reader::New();<BR> reader->SetFilePrefix("c:\\too\\too");<BR> reader->SetDataSpacing(1,1,1.5);<BR> reader->SetDataDimensions(512,512);<BR> reader->SetDataByteOrderToLittleEndian();<BR> reader->SetImageRange(1,100);<BR> </FONT></DIV>
<DIV><FONT size=2>vtkExtractVOI
*voi=vtkExtractVOI::New();<BR>
voi->SetInput(reader->GetOutput());<BR>
voi->SetVOI(0,400,0,400,10,10);</FONT></DIV>
<DIV><FONT size=2>vtkImageMapper
*mapper=vtkImageMapper::New();<BR>
mapper->SetInput(voi->GetOutput()); <BR> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> vtkActor2D *actor=vtkActor2D::New();<BR>
actor->SetMapper(mapper);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> vtkRenderer
*render=vtkRenderer::New();<BR> render->AddActor(actor);<BR>
<BR> vtkRenderWindow *renwin=vtkRenderWindow::New();<BR>
renwin->AddRenderer(render);<BR>
renwin->SetSize(800,600);<BR>
<BR> <BR> vtkCamera *aCamera = vtkCamera ::
New();<BR> aCamera->SetViewUp (0, 0,
-1);<BR> aCamera->SetPosition (0, 1,
0);<BR> aCamera->SetFocalPoint (0, 0,
0);<BR>
aCamera->ComputeViewPlaneNormal();<BR> <BR>vtkRenderWindowInteractor
*iren=vtkRenderWindowInteractor::New();<BR>
iren->SetRenderWindow(renwin);<BR>
iren->Initialize();<BR> <BR> render->SetActiveCamera(aCamera);<BR> render->ResetCamera();
<BR> render->Render();<BR>
iren->Start();</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>but when 5th and 6th parameter of setVOI is not 0,0,such as
0,10 or 5,5 etc,i can't display the image .I don't know what's the
problem.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks.</FONT></DIV></FONT></DIV></BODY></HTML>