<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> <BR>
<FONT color=#0000ff size=3> I compiled the example of vtkImageTracerWidget in VC++ 6.0 : TestImageTracerWidget . and it works </FONT><BR>
<FONT color=#0000ff size=3></FONT> <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> <BR>
<FONT color=#0000ff size=3>follows :</FONT><BR>
<FONT color=#0000ff size=3></FONT> <BR>
<FONT color=#0000ff size=3>vtkImageCast * readerImageCast1 = vtkImageCast::New();</FONT><BR>
<FONT color=#0000ff size=3> // its data from the output of vtkImageStencil</FONT><BR>
<FONT color=#0000ff size=3> readerImageCast1->SetInput((vtkDataObject *)stencil->GetOutput()); </FONT><BR>
<FONT color=#0000ff size=3> readerImageCast1->SetOutputScalarTypeToUnsignedChar();<BR></FONT><FONT color=#0000ff size=3>vtkBMPWriter * bmp = vtkBMPWriter::New();</FONT><BR>
<FONT color=#0000ff size=3> bmp->SetInput(readerImageCast1->GetOutput());</FONT><BR>
<FONT color=#0000ff size=3> bmp->SetFileName("C:/test.bmp");<BR> <FONT color=#ff0000>bmp->Write(); </FONT>// problem !!!! it does not work any more !<BR> bmp->Update();</FONT><BR>
<FONT color=#0000ff size=3></FONT> <BR>
<FONT color=#0000ff size=3> 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> <BR>
<FONT color=#0000ff size=3>black line , I want save the result within a spline after I draw the spline </FONT><FONT color=#0000ff size=3>on the picture . so </FONT><BR>
<FONT color=#0000ff size=3></FONT> <BR>
<FONT color=#0000ff size=3>what can I do if I want get the result like so ?</FONT><BR>
<BR>
<FONT color=#0000ff size=3> waiting for your answer and thank you very much !</FONT> <BR>
<BR>
<FONT color=#0000ff size=3> Mark</FONT><BR><br /><hr />用 Windows Live Spaces 展示个性自我,与好友分享生活! <a href='http://spaces.live.com/?page=HP' target='_new'>了解更多信息!</a></body>
</html>