<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><FONT color=#0000ff size=3>Hi ,</FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; I compiled the example of vtkImageTracerWidget in&nbsp;VC++ 6.0&nbsp;: TestImageTracerWidget . and it works </FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>very well . I </FONT><FONT color=#0000ff size=3>can get any regions of the picture . but I want to save the result , my code is as </FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>follows :</FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>vtkImageCast * readerImageCast1 = vtkImageCast::New();</FONT><BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; // its&nbsp;data from the output of vtkImageStencil</FONT><BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; readerImageCast1-&gt;SetInput((vtkDataObject *)stencil-&gt;GetOutput());&nbsp;</FONT><BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; readerImageCast1-&gt;SetOutputScalarTypeToUnsignedChar();<BR></FONT><FONT color=#0000ff size=3>vtkBMPWriter * bmp = vtkBMPWriter::New();</FONT><BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; bmp-&gt;SetInput(readerImageCast1-&gt;GetOutput());</FONT><BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; bmp-&gt;SetFileName("C:/test.bmp");<BR>&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>bmp-&gt;Write();&nbsp;</FONT>// problem !!!! it does not work any more !<BR>&nbsp;&nbsp;&nbsp;&nbsp;bmp-&gt;Update();</FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; I use vtkImageCast to change the image type before I save the result . but what I get is just a </FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>black line , I want save the result&nbsp;within a spline after I draw&nbsp;the spline </FONT><FONT color=#0000ff size=3>on the picture . so </FONT><BR>
<FONT color=#0000ff size=3></FONT>&nbsp;<BR>
<FONT color=#0000ff size=3>what&nbsp;can I do if I want get the result like so ?</FONT><BR>
&nbsp;<BR>
<FONT color=#0000ff size=3>&nbsp;&nbsp;&nbsp; waiting for your answer and thank you very much !</FONT>&nbsp;<BR>
&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#0000ff size=3>&nbsp;Mark</FONT><BR><br /><hr />用 Windows Live Spaces 展示个性自我,与好友分享生活!  <a href='http://spaces.live.com/?page=HP' target='_new'>了解更多信息!</a></body>
</html>