<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=349334114-03112009>I am new with VTK but i thought i insert points, no 
lines? Also in the visualization there are only points rendered, no lines! 
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=349334114-03112009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=349334114-03112009>Can you explain me why i insert lines and what i must 
do if i want to insert points only?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 
face=Arial></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 
face=Arial></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 
face=Arial></FONT>&nbsp;</DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> frinxor@gmail.com 
[mailto:frinxor@gmail.com] <B>Im Auftrag von </B>da<BR><B>Gesendet:</B> Montag, 
02. November 2009 18:24<BR><B>An:</B> Lodron, Gerald; 
vtkusers@vtk.org<BR><B>Betreff:</B> Re: [vtkusers] Deleting points form 
vtkPolyData object<BR></FONT><BR></DIV>
<DIV></DIV>Its not clear if you're adding multiple points or not...<BR><BR>Given 
the code you've included, you're only inserting one point from the line 
<BR>m_Points-&gt;GetPoints()-&gt;InsertNextPoint(m_daPointPosition);<BR>and then 
deleting the second point (index 1, but you only have index 0), which would 
cause a null pointer exception?<BR><BR><BR>If you're adding multiple points in 
the lines of code that are not included, make sure to include 
them.<BR><BR><BR><BR>
<DIV class=gmail_quote>On Mon, Nov 2, 2009 at 1:30 AM, Lodron, Gerald <SPAN 
dir=ltr>&lt;<A 
href="mailto:Gerald.Lodron@joanneum.at">Gerald.Lodron@joanneum.at</A>&gt;</SPAN> 
wrote:<BR>
<BLOCKQUOTE 
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote>Hello,<BR><BR>I stored a point list into the vtkPolyData 
  object using these lines:<BR><BR>//m_Points ... vtkPolyData Object 
  pointer<BR>//m_daPointPosition ... Three dimensional double array specifying 
  x,y and z coordinate of the 
  point<BR><BR>m_Points-&gt;GetPoints()-&gt;InsertNextPoint(m_daPointPosition);<BR>m_Points-&gt;GetVerts()-&gt;InsertNextCell(1);<BR>m_Points-&gt;GetVerts()-&gt;InsertCellPoint(m_Points-&gt;GetPoints()-&gt;GetNumberOfPoints()-1);<BR>m_Points-&gt;Update();<BR><BR>This 
  works fine, I also can visualize it. Now I want to delete a specific point, 
  e.g. the second point which was inserted, but I always get a null pointer 
  exception:<BR><BR>m_Points-&gt;DeletePoint(1); //Null pointer 
  exception<BR>m_Points-&gt;DeleteCell(1);<BR><BR>vtkCleanPolyData *Cleaner = 
  vtkCleanPolyData::New();<BR>Cleaner-&gt;SetInput(m_Points);<BR>Cleaner-&gt;Update();<BR><BR>m_Points 
  = 
  Cleaner-&gt;GetOutput();<BR>m_Points-&gt;Update();<BR>m_Points-&gt;BuildCells();<BR>m_Points-&gt;BuildLinks();<BR><BR>Cleaner 
  = NULL; //Use smart pointers to delete<BR><BR><BR>Have anybody a suggestion 
  what i made 
  false?<BR>_______________________________________________<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></BLOCKQUOTE></DIV><BR></BODY></HTML>