[vtkusers] problem to the coordinatensystem
guoyanmin
jacob_1224 at hotmail.com
Mon Jul 28 04:28:27 EDT 2008
hallo everyone, ich have the question, i have the surface and image, i want to cut a part of image with surface, i use this :
(vtkLinearTransform) transform = surface->GetTimeSlicedGeometry()->GetGeometry3D(0)->GetVtkTransform();
(vtkTransformPolyDataFilter) transformFilter->SetInput(surface->GetVtkPolyData());
transformFilter->SetTransform(transform);
transformFilter->Update();
dataToStencil->SetInput( transformFilter->GetOutput());
stencilData = dataToStencil->GetOutput();
stencil->SetStencil(stencilData);
stencil->SetBackgroundValue( 0 );
stencil->ReverseStencilOff();
vtkImageData *vtkimage =(mitkImage) img->GetVtkImageData();
stencil->SetInput( vtkimage );
stencil->Update();
vtkimage = stencil->GetOutput();
i can cut the image with surface, but this neu cutted image is not in good position, i want to show this neu cutted image looked like original image, that means in the mittel,but not at the corner of all. how can i do that?
best regards
_________________________________________________________________
Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
http://get.live.cn/product/photo.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080728/0deaa142/attachment.htm>
More information about the vtkusers
mailing list