<div dir="ltr">Hi,<div><br></div><div>I have a problem trying to obtain the inner points of a 3D reconstruction. I can visualize just fine but when I save the points and then re open to see them, I still see the image as when it was without the DataConnectivity Filter. Why that may be? SkinNormals gets the output of the filter..</div>
<div><br></div><div>here's the code:</div><div><br></div><div><div> vtkContourFilter skinextractor = vtkContourFilter.New();</div><div> skinextractor.SetInputConnection(readerdicom.GetOutputPort());</div><div>
skinextractor.GetValues();</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.Update();</div><div> contornos.SetColorRegions(1);</div><div> </div><div><br></div><div> vtkPolyDataNormals skinnormals = vtkPolyDataNormals.New();</div>
<div> //skinnormals.SetInputConnection(skinextractor.GetOutputPort());</div><div> skinnormals.SetInputConnection(contornos.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> 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><br></div><div> using (StreamWriter writer = new StreamWriter(@"C:/tracker/" + "mesh.poi", false)) // False to overwrite the file; True to append data to the file; </div>
<div> {</div><div> for (int i = 0; i < POIs_3D.Count; i++)</div><div> {</div><div> writer.WriteLine(POIs_3D[i].POI_x + ";" + POIs_3D[i].POI_y + ";" + POIs_3D[i].POI_z);</div>
<div> }</div><div><br></div><div> }</div></div></div>