Hi there,<br>I have a question dealing with the affine transformation in Python.<br>I use an image from itk which I convert to an vtk image <br><br>- itk_vtk_converter = itk.ImageToVTKImageFilter[<div id=":4l" class="ii gt">
image_type].New()<br>- itk_vtk_converter.SetInput( gauss_filterz.GetOutput() )<br>
- itk_vtk_converter.Update()<br> <br>and afterwards I set up the transformation<br>
and the transformation filter.<br><br>- import vtk<br><br>- trans= vtk.vtkTransform()<br>- trans.Translate(100,100,100)<br>- trans.PostMultiply()<br>- trans.RotateZ(30)<br>- trans.Update()<br><br>- tfilter = vtk.vtkTransformFilter()<br>
- tfilter.SetTransform(trans)<br>- tfilter.SetInput(itk_vtk_converter.GetOutput())<br>- tfilter.Update()<br><br>The I tried to give the output of the transformation filter to the volume mapper<br><br>volume_mapper = vtk.vtkVolumeRayCastMapper()<br>
volume_mapper.SetInput( tfilter.GetOutput() )<br><br>But after execution of the script I get the empty renderer window and the error message <br><br><br>ERROR: In ..\..\vtk-5.4.2\Filtering\vtkDemandDrivenPipeline.cxx, line 728<br>
vtkStreamingDemandDrivenPipeline (0D4C0AA0): Input port 0 of algorithm vtkVolumeRayCastMapper(0D476A48) has 0 connections but is not optional.<br><br>(072A8E20) has 0 connections but is not optional.<br><br><br>I think there is somethin wrong with the in- or output to or from the transformation filter.<br>
<br>Maybe someone knows what I'm missing out.<br><br>Thanks Stefan</div>