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