[vtkusers] HELP !!! How to Save The Result ???

JohnMark zhaojunxp at hotmail.com
Sun Aug 26 00:16:51 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 , 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 ?
 
    waiting for your answer and thank you very much ! 
 
     Mark
_________________________________________________________________
Windows Live Spaces 中最年轻的成员!
http://miaomiaogarden2007.spaces.live.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070826/8a3b357e/attachment.htm>


More information about the vtkusers mailing list