<div dir="ltr">hello David,<div><br></div><div>I find this very interesting and it would help me a lot. However, I seem to be having trouble with importing the python binding libraries for these classes. Ive set the PYTHONPATH to the directory where the "airs.py" is located and i get an error like:</div>

<div><div>import error loading library vtkImageAnalysisPython</div><div>import error loading library vtkImageRegistrationPython</div><div>import error loading library vtkImageSegmentationPython</div></div><div><br></div>
<div>
Any ideas how to get around this ? sorry for the trouble.</div><div><br></div><div>jatin</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 4:54 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right now the only examples are the C++ examples in the github<br>
repository.  I cannot provide much assistance, because I have had<br>
to put this project on hold while I work on other projects.<br>
<br>
But to get you started, from python you would use it something like this:<br>
<br>
import vtk<br>
import airs<br>
<br>
... load the images ...<br>
<br>
registration = vtk.vtkImageRegistration()<br>
registration.SetFixedImage(targetImage)<br>
registration.SetMovingImage(sourceImage)<br>
... set other registration parameters ...<br>
<br>
while (registration.Iterate()):<br>
      # Iterate() returns "false" when it is done<br>
      print "did an iteration"<br>
<br>
transform = registration.GetTransform()<br>
<br>
See the main header "vtkImageRegistration.h" for more info.<br>
<br>
  David<br>
<br>
<br>
<br>
On Wed, Apr 16, 2014 at 8:20 AM, Jatin Nath<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:jatin.nath.bme09@iitbhu.ac.in">jatin.nath.bme09@iitbhu.ac.in</a>> wrote:<br>
> hey,<br>
> I ve managed to build AIRS finally. if possible, do u have a code snippet or<br>
> an example which could get me started on using its functionality with python<br>
> binding. i fairly simple and direct example would be of great help.Thanks !<br>
><br>
> jatin<br>
><br>
><br>
> On Wed, Apr 16, 2014 at 3:51 PM, Jatin Nath <<a href="mailto:jatin.nath.bme09@iitbhu.ac.in">jatin.nath.bme09@iitbhu.ac.in</a>><br>
> wrote:<br>
>><br>
>> hey david,<br>
>><br>
>> thanks for the mail. however I couldnt complete building which stops at<br>
>> around 28%. I get the following error<br>
>><br>
>> /usr/bin/ld:<br>
>> ../bin/libvtkImageSegmentationPythonD.a(vtkImageFloodFillPython.o):<br>
>> relocation R_X86_64_32 against `.rodata' can not be used when making a<br>
>> shared object; recompile with -fPIC<br>
>> ../bin/libvtkImageSegmentationPythonD.a: could not read symbols: Bad value<br>
>> collect2: error: ld returned 1 exit status<br>
>> make[2]: *** [bin/vtkImageSegmentationPython.so] Error 1<br>
>> make[1]: ***<br>
>> [ImageSegmentation/CMakeFiles/vtkImageSegmentationPython.dir/all] Error 2<br>
>> make[1]: *** Waiting for unfinished jobs....<br>
>> make[1]: *** [ImageRegistration/CMakeFiles/vtkImageRegistration.dir/all]<br>
>> Error 2<br>
>> make: *** [all] Error 2<br>
>><br>
>> Any idea how to get around this ? I m using VTK 5.10.1 and CMake 2.8.9<br>
>> thanks<br>
>> Jatin<br>
>><br>
>><br>
>> On Wed, Apr 16, 2014 at 2:45 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Wed, Apr 16, 2014 at 3:54 AM, Jatin Nath<br>
>>> <<a href="mailto:jatin.nath.bme09@iitbhu.ac.in">jatin.nath.bme09@iitbhu.ac.in</a>> wrote:<br>
>>> > hey vtk users,<br>
>>> ><br>
>>> > I have a problem that requires me to register two 3d vtk CT images and<br>
>>> > I was<br>
>>> > hoping there would be a way to do this in VTK. I have been using vtk<br>
>>> > with<br>
>>> > python binding and have been experiencing troubles with python wrapping<br>
>>> > for<br>
>>> > ITK. hence was hoping there would be a way around this using VTK.. Can<br>
>>> > anybody suggest a way ?<br>
>>><br>
>>> I have a set of image registration classes in my github repository, and<br>
>>> they<br>
>>> have all the necessary cmake machinery to make them build with python:<br>
>>> <a href="https://github.com/dgobbi/AIRS" target="_blank">https://github.com/dgobbi/AIRS</a><br>
>>><br>
>>> However:<br>
>>> 1) they are for VTK 5.10 only, for now at least<br>
>>> 2) I have no public documentation for them yet<br>
>>><br>
>>> The code in "Programs" and "Examples" is the best place to start, if you<br>
>>> are<br>
>>> interested in taking a look.  If you do find them useful, please let me<br>
>>> know.<br>
>>><br>
>>>   David<br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Jatin Nath,<br>
>> School of BioMedical Engineering,<br>
>> Indian Institute of Technology (Banaras Hindu University), Varanasi<br>
><br>
><br>
><br>
><br>
> --<br>
> Jatin Nath,<br>
> School of BioMedical Engineering,<br>
> Indian Institute of Technology (Banaras Hindu University), Varanasi<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jatin Nath,<br>School of BioMedical Engineering,<br>Indian Institute of Technology (Banaras Hindu University), Varanasi<br>
</div>