<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hello , vtkusers ,<BR> I want to extract any regions from a 2D CT slice , so I use the vtkImageTracerWidget . surely , it is perfect , I can clip any regions . but there is the problem coming : I want to save the result with vtkBMPWriter :<BR> <BR>vtkImageCast * readerImageCast = vtkImageCast::New();<BR>// its data from the output of vtkImageStencil<BR>readerImageCast->SetInput((vtkDataObject *)stencil->GetOutput()); <BR>readerImageCast->SetOutputScalarTypeToUnsignedChar();<BR>vtkBMPWriter * bmp = vtkBMPWriter::New();<BR>bmp->SetInput(readerImageCast1->GetOutput());<BR>bmp->SetFileName("C:/test.bmp"); <BR><FONT color=#0000ff>bmp->Write(); // problem !!!! it does not work any more !</FONT> <BR>bmp->Update();<BR> <BR> however , it does not work , what I got is just a black line ( nothing ) . and then I change my method , I add a KeyReleaseEvent and a AddObserver of vtkRenderWindowInteractor , the render window would capture the message when the key was released and I get the region , then I will save the result , but I still get nothing .<BR> <BR> so what is wrong with my thinking ? and I know the vtkImageTracerWidget class wrap the vtkImageViewer , vtkActor and so on , I can save the result rendering in the vtkImageViewer , but I can do nothing with the result of vtkImageTracerWidget . we can not save the result but just to see it , isn't it ? if it is not , is there any method or any class to save it ? <BR> <BR> thank you with great regards ! and waiting for your answer !<BR> <BR> Mark<BR> <BR> PS . this is a problem I have been thinking for almost a month , I still get nothing now . <BR><BR><br /><hr />使用新一代 Windows Live Messenger 轻松交流和共享! <a href='http://messenger.live.cn/' target='_new'>立即体验!</a></body>
</html>