[vtkusers] vtkImageTracerWidget & vtkBMPWriter
JohnMark
zhaojunxp at hotmail.com
Wed Aug 29 20:56:10 EDT 2007
Hello , vtkusers , I want to extract any regions from a 2D CT slice , so I use the vtkImageTracerWidget . surely , it is perfect , I can clip any regions . but there is the problem coming : I want to save the result with vtkBMPWriter : vtkImageCast * readerImageCast = vtkImageCast::New();// its data from the output of vtkImageStencilreaderImageCast->SetInput((vtkDataObject *)stencil->GetOutput()); readerImageCast->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(); however , it does not work , what I got is just a black line ( nothing ) . and then I change my method , I add a KeyReleaseEvent and a AddObserver of vtkRenderWindowInteractor , the render window would capture the message when the key was released and I get the region , then I will save the result , but I still get nothing . so what is wrong with my thinking ? and I know the vtkImageTracerWidget class wrap the vtkImageViewer , vtkActor and so on , I can save the result rendering in the vtkImageViewer , but I can do nothing with the result of vtkImageTracerWidget . we can not save the result but just to see it , isn't it ? if it is not , is there any method or any class to save it ? thank you with great regards ! and waiting for your answer ! Mark PS . this is a problem I have been thinking for almost a month , I still get nothing now .
_________________________________________________________________
Windows Live Custom Domain,您的免费电子邮局。
https://domains.live.com/default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070830/0859737f/attachment.htm>
More information about the vtkusers
mailing list