<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hi ,<BR>&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; bmp-&gt;Write(); // problem !!!! it does not work any more !&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 , I want save the result within a spline after I draw the spline on the picture . so&nbsp;what can I do if I want 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<BR><BR><br /><hr />使用新一代 Windows Live Messenger 轻松交流和共享! <a href='http://messenger.live.cn/' target='_new'>立即体验!</a></body>
</html>