<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks for your reply.<div>We have just tried before to do what you suggested.</div><div>Any other idea??</div><div>Thanks</div><div>Paola<br><br><div><hr id="stopSpelling">Subject: Re: [ITK] (no subject)<br>From: michkapopoff@gmail.com<br>Date: Thu, 2 Oct 2014 13:11:13 +0200<br>CC: community@itk.org<br>To: pola_88@hotmail.it<br><br>Hi<div><br></div><div>for the moment, the PyBuffer module has been moved out of ITK, and is no more maintained.</div><div>There was a port done for ITK4, but it is not tested so I don’t know how well it is working [1]</div><div>I plan to work a little bit on it one day if I can find some time.</div><div><br></div><div>The way to move images from itk to vtk is to use the ITKVTKGlue module.</div><div>You need to build ITK with:</div><div>Module_ITKVtkGlue=ON</div><div><br></div><div>Then you can do something like this (for a 2d image for example):</div><div><br></div><div><div>image_type = itk.Image[itk.UC, 2]</div><div>reader = itk.ImageFileReader[image_type].New()</div><div>reader.SetFileName(“PATH/TO/FILE”)</div><div>reader.Update()</div><div>vtk_image = itk.ImageToVTKImageFilter[image_type].New()</div><div>vtk_image.SetInput(reader.GetOutput())</div><div>vtk_image.Update()</div></div><div><br></div><div>Then you can use the vtk_image as a vtk object, that you can render or work on.</div><div><br></div><div>Is there a specific error message you get ?</div><div><br></div><div>Michka</div><div><br></div><div>[1] <a href="https://github.com/InsightSoftwareConsortium/itkPyBuffer" target="_blank">https://github.com/InsightSoftwareConsortium/itkPyBuffer</a></div><div><br><div><div>On 2 oct. 2014, at 11:45, Paola Volonghi <<a href="mailto:pola_88@hotmail.it">pola_88@hotmail.it</a>> wrote:</div><br class="ecxApple-interchange-newline"><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><div dir="ltr"><div style="padding:0px;line-height:24px;"><span lang="EN-US">Hi all,</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">we developed a python program on ubuntu 13.10 using vtk library ver. 5.8.0 and itk library ver. 3.20.1. In our program we used also these command lines:</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">itk.VTKImageToImageFilter.IF3.New()</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">itk.ImageToVTKImageFilter[image_type].New()</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">itk.PyBuffer[image_type].GetArrayFromImage( …. )<b></b></span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">but we discovered that they don't work on itk ver. 4.x.</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">Is there another way to convert images from itk to vtk and vice versa, using the newest versions of vtk and itk?</span></div><p class="ecxStandard" style="padding:0px;line-height:24px;"><span lang="EN-US"> </span></p><div style="padding:0px;line-height:24px;"><span lang="EN-US">Thanks!</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US"><br></span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US">Paola</span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US"><br></span></div><div style="padding:0px;line-height:24px;"><span lang="EN-US"><br></span></div></div>_______________________________________________<br>Community mailing list<br><a href="mailto:Community@itk.org">Community@itk.org</a><br><a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a></div></blockquote></div><br></div></div></div>                                    </div></body>
</html>