<div dir="ltr">I guess I will answer the question myself...<div><br></div><div>The points are in millimeters (mm) and relative to the origin (0,0).</div><div><br></div><div>Regards,</div><div><br></div><div>Matias.</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 17, 2014 at 10:34 AM, Matias Montroull <span dir="ltr"><<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@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">Hi,<div><br></div><div>I've extracted points out of my polydata this way:</div><div>My question is:</div>
<div>are these points in mm? pixels?</div><div><br></div><div>here's a sample of what I got:</div>
<div><br></div><div><table border="0" cellpadding="0" cellspacing="0" width="192" style="border-collapse:collapse;width:144pt">
<colgroup><col width="64" span="3" style="width:48pt">
</colgroup><tbody><tr height="20" style="height:15pt">
<td height="20" align="right" width="64" style="height:15pt;width:48pt">150.5861</td>
<td align="right" width="64" style="width:48pt">120.1173</td>
<td align="right" width="64" style="width:48pt">7.200073</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">151.172</td>
<td align="right">120.1173</td>
<td align="right">7.164073</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">151.172</td>
<td align="right">120.0168</td>
<td align="right">7.200073</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">151.7579</td>
<td align="right">120.1173</td>
<td align="right">7.146607</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">151.7579</td>
<td align="right">119.9575</td>
<td align="right">7.200073</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">152.3439</td>
<td align="right">120.1173</td>
<td align="right">7.123975</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">152.3439</td>
<td align="right">119.8792</td>
<td align="right">7.200073</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">152.9298</td>
<td align="right">120.1173</td>
<td align="right">7.107765</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt">152.9298</td>
<td align="right">119.8332</td>
<td align="right">7.200073</td>
</tr></tbody></table><br></div><div><br></div><div><div> vtkContourFilter skinextractor = vtkContourFilter.New();</div><div> skinextractor.SetInputConnection(readerdicom.GetOutputPort());</div><div> skinextractor.SetValue(0, -800);</div>
<div><br></div><div> vtkPolyDataConnectivityFilter contornos = new vtkPolyDataConnectivityFilter();</div><div> contornos.SetInputConnection(skinextractor.GetOutputPort());</div><div> contornos.SetExtractionModeToLargestRegion();</div>
<div> contornos.SetColorRegions(1);</div><div><br></div><div> vtkCleanPolyData removepoints = new vtkCleanPolyData();</div><div> removepoints.SetInput(contornos.GetOutput());</div><div> removepoints.Update();</div>
<div><br></div><div> vtkPolyDataNormals skinnormals = vtkPolyDataNormals.New();</div><div> //skinnormals.SetInputConnection(skinextractor.GetOutputPort());</div><div> skinnormals.SetInputConnection(removepoints.GetOutputPort());</div>
<div> skinnormals.SetFeatureAngle(90.0);</div><div> skinnormals.ComputePointNormalsOn();</div><div><br></div><div> vtkPolyData polys = new vtkPolyData();</div><div> polys = skinnormals.GetOutput();</div>
<div> polys.Update();</div><div><br></div><div> </div><div><br></div><div> //polys.BuildCells();</div><div> int numberofpoints = polys.GetNumberOfPoints();</div><div><br></div><div>
for (int i = 0; i < polys.GetNumberOfPoints(); i ++)</div><div> {</div><div> double[] p = new double[3];</div><div> p = polys.GetPoint(i);</div><div> POI poi_mesh_individual = new POI();</div>
<div> poi_mesh_individual.POI_x = Convert.ToDecimal(p[0]);</div><div> poi_mesh_individual.POI_y = Convert.ToDecimal(p[1]);</div><div> poi_mesh_individual.POI_z = Convert.ToDecimal(p[2]);</div>
<div> POIs_3D.Add(poi_mesh_individual);</div><div> }</div></div></div>
</blockquote></div><br></div>