<div dir="ltr">Thanks!<br>how I should do that?<br>set the origin of the vtkImageData to (0,0,0)<br>while I have a polyData that was written by vtkPolyDataWriter and of course the vtk file.<br><br><div class="gmail_quote">
On Fri, Mar 2, 2012 at 2:30 PM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay, what you should do is left-right flip the vtkImageData (use vtkImageFlip) and set the origin of the vtkImageData to (0,0,0). Probably this will fix the problem. <div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">
On Fri, Mar 2, 2012 at 1:29 PM, Hila Hiler <span dir="ltr"><<a href="mailto:hilahiler@gmail.com" target="_blank">hilahiler@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The poly data is a segmentation from the nifti file and was written by vtkPolyDataWriter.<br>I read the nifti file by itk.<br>
To visualize them I use Mitk.<br><br>please ask more if I missed any detail ... <br><div><div></div><div>
<br><div class="gmail_quote">On Fri, Mar 2, 2012 at 2:18 PM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Hila,<div><br></div><div>How was the polydata obtained and how do you read the nifti file in VTK?</div><div><br></div><div>Best,</div><div>Martijn<br><br><div class="gmail_quote"><div><div>On Fri, Mar 2, 2012 at 12:29 PM, Hila Hiler <span dir="ltr"><<a href="mailto:hilahiler@gmail.com" target="_blank">hilahiler@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi all,<br><br>I have one vtk file consists of polyData and another nifti file consists gray values.<br>
I'd like to align them.<br><br><b>data of vtk file:<br>===============</b><br> GetGeometry3D(0): Geometry3D (0314A390)<br>
IndexToWorldTransform: <br> Matrix: <br> 1 0 0 <br> 0 1 0 <br> 0 0 1 <br> Offset: [0, 0, 0]<br> Center: [0, 0, 0]<br> Translation: [0, 0, 0]<br> Inverse: <br>
1 0 0 <br> 0 1 0 <br> 0 0 1 <br> Scale : 1 1 1 <br> BoundingBox: ( -16.886,63.6804 -102.803,88.6225 -19.869,79.0607 )<br> Origin: [0, 0, 0]<br> ImageGeometry: 0<br>
Spacing: [1, 1, 1]<br> TimeBounds: [-3.40282e+038, 3.40282e+038]<br><br><b><br>data of nifti file:<br>===============</b><br>GetGeometry2D(0): PlaneGeometry (0BE3CAE8)<br> IndexToWorldTransform: <br>
Matrix: <br> 0.488281 0 0 <br> 0 -0.488281 0 <br> 0 0 -1 <br> Offset: [-122.375, 115.432, -122.515]<br> Center: [0, 0, 0]<br> Translation: [-122.375, 115.432, -122.515]<br>
Inverse: <br> 2.048 0 0 <br> 0 -2.048 0 <br> 0 0 -1 <br> Scale : 1 1 1 <br> BoundingBox: ( 0,512 0,512 0,1 )<br> Origin: [-122.375, 115.432, -122.515]<br>
ImageGeometry: 1<br> Spacing: [0.488281, 0.488281, 1]<br> TimeBounds: [-3.40282e+038, 3.40282e+038]<br><br></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>