[vtkusers] unite surface

nik-rv bloodiron.ru at gmail.com
Mon Dec 28 12:08:55 EST 2009


Your example for me is very added.
Im beginner in VTK.
You could not explain in more details creation Surface.
I will be very grateful to you

Roman



David Doria-2 wrote:
> 
>> It is my code:
>>
>>   int signX = 1; //Math.Sign(imageOrientation[0]);
>>                int signY = 1; //Math.Sign(imageOrientation[4]);
>>
>>                bool collectFirstArray = true;
>>
>>                StreamReader reader = new StreamReader(m_ContourPath);
>>
>>                vtkPoints points = new vtkPoints();
>>                vtkCellArray polys = new vtkCellArray();
>>
>>                int num = 0;
>>
>>                while (!reader.EndOfStream)
>>                {
>>                    double xx, yy, zz;
>>                    String line = reader.ReadLine();
>>
>>                    if (!line.Equals("---"))
>>                    {
>>                        IList<String> val = line.Split();
>>                        xx = System.Convert.ToDouble(val[0]);
>>                        yy = System.Convert.ToDouble(val[1]);
>>                        zz = System.Convert.ToDouble(val[2]);
>>                        array1.Add(new Point3d(xx, yy, zz));
>>                    }
>>                    else
>>                    {
>>                        polys.InsertNextCell(array1.Count + 1);
>>                        foreach (Point3d point3D in array1)
>>                        {
>>                            points.InsertPoint(num, point3D.x, point3D.y,
>> point3D.z);
>>                            polys.InsertCellPoint(num);
>>                            num++;
>>                        }
>>                        points.InsertPoint(num, array1[0].x, array1[0].y,
>> array1[0].z);
>>                        polys.InsertCellPoint(num);
>>                        array1.Clear();
>>                    }
>>                }
>>
>>                reader.Close();
>>
>>                vtkPolyData contours = new vtkPolyData();
>>                contours.SetPoints(points);
>>                contours.SetPolys(polys);
>>
>>
>>                vtkPolyDataMapper contourMapper = new vtkPolyDataMapper();
>>                contourMapper.SetInput(contours);
>>
>>
>>                vtkVoxelContoursToSurfaceFilter m_pSurfaceFilterIdealJaw =
>> new vtkVoxelContoursToSurfaceFilter();
>>                m_pSurfaceFilterIdealJaw.SetInput(contours);
>>                m_pSurfaceFilterIdealJaw.SetMemoryLimitInBytes(3500000);
>>
>> it is result work
>>
>> http://old.nabble.com/file/p26944773/vtk.jpg
>> http://old.nabble.com/file/p26944773/vtk-2.jpg
>>
>> It is surface have rupture.
>>
>> On it I cannot save STL file.
>>
>> As to me to make that there was a continuous surface.
>> That I could save this surface in STL file?
>>
>>
>>
>>
>>
>>
>> siqi chen wrote:
>>>
>>> Hi, nlk-rv,
>>>
>>> I believe this "rupture" issue may be due to the reason that the
>>> intermediate contours don't overlap a lot. Although I have no idea what
>>> the
>>> reference paper behind this filter, I guess it is just based on stacking
>>> the
>>> slices "implicitly" and run Marching Cubes.
>>> It will be good if you provide your datasets.
>>>
>>> Siqi
>>>
>>> On Sun, Dec 27, 2009 at 2:10 PM, nik-rv <bloodiron.ru at gmail.com> wrote:
>>>
>>>>
>>>> I create Surface using vtkVoxelContoursToSurfaceFilter.
>>>>
>>>> For me turn out Surface with ruptures. Prompt please as them to unite
>>>> in
>>>> one
>>>> Surface.
>>>>
>>>> What filter needs to be used?
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/unite-surface-tp26936363p26936363.html
>>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/unite-surface-tp26936363p26944773.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> 
> I tried to throw an example together real quick:
> 
> http://www.cmake.org/Wiki/VTK/Examples/ContoursToSurface
> 
> but it is having some issues (only one circle is appearing, etc).  If
> you (or someone else) wants to fix this example, this would definitely
> be the first place to start. If you can get it to work with controlled
> data, then we'll move on to why your data is not working properly.
> 
> Thanks,
> 
> David
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 

-- 
View this message in context: http://old.nabble.com/unite-surface-tp26936363p26945306.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list