[vtkusers] HELP !!! How To Save The Result Of vtkImageTracerWidget ???
JohnMark
zhaojunxp at hotmail.com
Mon Aug 27 03:09:58 EDT 2007
Hi ,
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 :vtkImageCast * readerImageCast1 = vtkImageCast::New(); // its data from the output of vtkImageStencil readerImageCast1->SetInput((vtkDataObject *)stencil->GetOutput()); readerImageCast1->SetOutputScalarTypeToUnsignedChar();vtkBMPWriter * bmp = vtkBMPWriter::New(); bmp->SetInput(readerImageCast1->GetOutput()); bmp->SetFileName("C:/test.bmp"); bmp->Write(); // problem !!!! it does not work any more ! bmp->Update(); 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 ? waiting for your answer and thank you very much ! Mark
_________________________________________________________________
手机也能上 MSN 聊天了,快来试试吧!
http://mobile.msn.com.cn/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070827/043e3b04/attachment.htm>
More information about the vtkusers
mailing list