<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>&nbsp;&nbsp;&nbsp; I want to extract any regions from a 2D CT slice , so I use the vtkImageTracerWidget . surely , it is perfect , I can&nbsp;clip&nbsp;any regions . but there is the problem coming : I&nbsp;want to save the result&nbsp;with vtkBMPWriter&nbsp;:<BR>&nbsp;<BR>vtkImageCast * readerImageCast = vtkImageCast::New();<BR>// its data from the output of vtkImageStencil<BR>readerImageCast-&gt;SetInput((vtkDataObject *)stencil-&gt;GetOutput());&nbsp;<BR>readerImageCast-&gt;SetOutputScalarTypeToUnsignedChar();<BR>vtkBMPWriter * bmp = vtkBMPWriter::New();<BR>bmp-&gt;SetInput(readerImageCast1-&gt;GetOutput());<BR>bmp-&gt;SetFileName("C:/test.bmp");&nbsp;&nbsp;&nbsp;&nbsp;<BR><FONT color=#0000ff>bmp-&gt;Write(); // problem !!!! it does not work any more !</FONT>&nbsp;&nbsp;&nbsp;&nbsp;<BR>bmp-&gt;Update();<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; however , it does not work , what I got is just a black line ( nothing )&nbsp;. and then I change my&nbsp;method , I&nbsp;add a&nbsp;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>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 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&nbsp;the result of vtkImageTracerWidget .&nbsp;we can not save&nbsp;the result but just to see it , isn't it ? if it is not , is there any method or any class&nbsp;to save it ?&nbsp;&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; thank you with great regards ! and waiting for your answer !<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Mark<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; PS . this is a problem I have been thinking for almost a month , I still get nothing&nbsp;now .&nbsp;<BR><BR><br /><hr />使用新一代 Windows Live Messenger 轻松交流和共享! <a href='http://messenger.live.cn/' target='_new'>立即体验!</a></body>
</html>