<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 , </FONT><BR>
<FONT size=3> I compiled the example of vtkImageTracerWidget in VC++ 6.0 : TestImageTracerWidget . and it works very well . I can get any regions of the picture . but I want to save the result , my code is as follows :<BR><BR>vtkImageCast * readerImageCast1 = vtkImageCast::New();<BR> // its data from the output of vtkImageStencil<BR> readerImageCast1->SetInput((vtkDataObject *)stencil->GetOutput()); <BR> readerImageCast1->SetOutputScalarTypeToUnsignedChar();<BR>vtkBMPWriter * bmp = vtkBMPWriter::New();<BR> bmp->SetInput(readerImageCast1->GetOutput());<BR> bmp->SetFileName("C:/test.bmp"); <BR> <FONT color=#0000ff>bmp->Write(); // problem !!!! it does not work any more !</FONT> <BR> bmp->Update();<BR><BR> 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 I think the widget result is dynamic . but what can I do if I want to get the result like so ?<BR><BR> waiting for your answer and thank you very much ! <BR><BR> Mark</FONT><BR><br /><hr />Windows Live Writer 让您告别龟速网络,轻松写日志! <a href='http://writer.live.com/' target='_new'>立即使用!</a></body>
</html>