<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
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 :<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (vtkLinearTransform)&nbsp; transform = surface-&gt;GetTimeSlicedGeometry()-&gt;GetGeometry3D(0)-&gt;GetVtkTransform();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (vtkTransformPolyDataFilter)&nbsp; transformFilter-&gt;SetInput(surface-&gt;GetVtkPolyData());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; transformFilter-&gt;SetTransform(transform);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; transformFilter-&gt;Update();&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; dataToStencil-&gt;SetInput( transformFilter-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stencilData = dataToStencil-&gt;GetOutput();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; stencil-&gt;SetStencil(stencilData);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; stencil-&gt;SetBackgroundValue( 0 );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; stencil-&gt;ReverseStencilOff();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; vtkImageData *vtkimage =(mitkImage) img-&gt;GetVtkImageData();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; stencil-&gt;SetInput( vtkimage );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; stencil-&gt;Update();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; vtkimage = stencil-&gt;GetOutput();<br><br>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?<br><br>best regards<br><br><br><br><div>
&nbsp;<BR></div><br /><hr />使用新一代 Windows Live Messenger 轻松交流和共享! <a href='http://messenger.live.cn/' target='_new'>立即体验!</a></body>
</html>