<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><FONT size=3>Hi ,&nbsp;</FONT><BR>
<FONT size=3>&nbsp;&nbsp; I compiled the example of vtkImageTracerWidget in VC++ 6.0 : TestImageTracerWidget . and it works&nbsp;very well . I can get any regions of the picture . but I want to save the result , my code is as&nbsp;follows :<BR><BR>vtkImageCast * readerImageCast1 = vtkImageCast::New();<BR>&nbsp;&nbsp;&nbsp; // its data from the output of vtkImageStencil<BR>&nbsp;&nbsp;&nbsp; readerImageCast1-&gt;SetInput((vtkDataObject *)stencil-&gt;GetOutput()); <BR>&nbsp;&nbsp;&nbsp; readerImageCast1-&gt;SetOutputScalarTypeToUnsignedChar();<BR>vtkBMPWriter * bmp = vtkBMPWriter::New();<BR>&nbsp;&nbsp;&nbsp; bmp-&gt;SetInput(readerImageCast1-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; bmp-&gt;SetFileName("C:/test.bmp");&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>bmp-&gt;Write(); // problem !!!! it does not work any more !</FONT>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; bmp-&gt;Update();<BR><BR>&nbsp;&nbsp;&nbsp; I use vtkImageCast to change the image type before I save the result . but what I get is just a black line ( even though I use the Update() method ), I want save the result within a spline after I draw the spline on the picture .maybe many writer classes , like vtkBMPWriter , couldn't save the dynamic result . because&nbsp;I think the widget result is dynamic . but what can I do if I want to get the result like so ?<BR><BR>&nbsp;&nbsp;&nbsp; waiting for your answer and thank you very much ! <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp; Mark</FONT><BR><br /><hr />Windows Live Writer 让您告别龟速网络,轻松写日志! <a href='http://writer.live.com/' target='_new'>立即使用!</a></body>
</html>