<div dir="ltr"><div>yes it is</div><div> </div><div># vtk DataFile Version 3.0<br>vtk output<br>ASCII<br>DATASET POLYDATA<br>POINTS 2402 float<br>-0.808409 1.14813 17.7883 -0.817523 1.32669 17.7764 -2.34968 1.10108 17.9052 <br>
</div><div> </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 11:45 AM, Siavash Khallaghi <span dir="ltr"><<a href="mailto:siavashk@ece.ubc.ca" target="_blank">siavashk@ece.ubc.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><div>What is the format of your point set? Is it vtkPolyData?<br>
<br>
Siavash<br><br><div class="gmail_quote">Petr Jilkine <<a href="mailto:petr.jilkine@cimtec-canada.ca" target="_blank">petr.jilkine@cimtec-canada.ca</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div><div class="h5">
<div dir="ltr"><div>Hello,</div><div> </div><div>I have 2 images fixed and moving. I apply some linear transform to moving image <br>to bring it to physical space of fixed image using ResampleImageFilter (see metacode)</div>
<p> typedef typename itk::ResampleImageFilter< InputImageType, OutputImageType > ResampleFilterType;<br> ResampleFilterType::Pointer resample = ResampleFilterType::New();</p><p> resample->SetInput( moving );<br>
resample->SetTransform( transform );<br> resample->SetSize( fixed->GetLargestPossibleRegion().GetSize() );<br> resample->SetOutputOrigin( fixed->GetOrigin() );<br> resample->SetOutputSpacing( fixed->GetSpacing() );<br>
resample->SetOutputDirection( fixed->GetDirection() );<br> resample->SetDefaultPixelValue( zeroValue );<br> <br>I also have 2 point sets, one in fixed, another in moving image. <br>I would like to resample moving point set in a similar way. <br>
For this I use (metacode)</p><p> typedef itk::TransformMeshFilter< MeshType, MeshType, TransformType > TransformMeshType;</p><p> TransformMeshType::Pointer movingTransformMesh = TransformMeshType::New();<br> movingTransformMesh->SetInput(movingMesh); <br>
movingTransformMesh->SetTransform(transform);<br> movingTransformMesh->Update();</p><div>Probably I need to use an inverse transform instead.</div><div>I guess if the points in point sets had world coordinates if would work.<br>
But coordinates of the points are wrt the center of corresponding image. <br>Now I need to convert these local coordinates to world coordinates taking <br>into account origin, spacing and direction matrix of the corresponding image. <br>
TransformMeshFilter seems a good candidate to do the job, but it is not clear <br>how to pass origin, spacing and direction matrix to the filter.</div><p>Coordinates conversion like this seems a standard problem and <br>
I guess there is a standard way to do it in ITK. However, so far <br>
I couldn’t find an appropriate ITK class/function.</p><p>Any advice on this matter is really appreciated.</p><p>Thanks,<br>Peter Jilkine<br></p></div>
<p style="margin-top:2.5em;margin-bottom:1em;border-bottom-color:rgb(0,0,0);border-bottom-width:1px;border-bottom-style:solid"></p></div></div><pre style="font-family:sans-serif;margin-top:0px;white-space:pre-wrap"><hr><br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></pre></blockquote></div><span class="HOEnZb"><font color="#888888"><br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.</font></span></div></div></blockquote></div><br></div></div>