<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I'm trying to use vtkLabeledMapper (to label
Points) as explained in the book (labeling data)</FONT></DIV>
<DIV><FONT face=Arial size=2>and my "raw data" is made with </FONT><FONT
face=Arial size=2>a vtkPolyData (I made a correct SetPoint and a
SetPolys).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>void CLabeledData::Label( vtkPolyData *polyData
)</FONT></DIV>
<DIV><FONT face=Arial size=2>{</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT><A
href="file://vtkIdFilter"><FONT color=#000000 face=Arial
size=2>//vtkIdFilter</FONT></A><FONT face=Arial size=2> *m_IdFilter =
vtkIdFilter::New();</FONT>
[done in constructor]</DIV>
<DIV><FONT face=Arial size=2> m_IdFilter->SetInput(
polyData );<BR>
m_IdFilter->SetPointIdsOn();<BR>
m_IdFilter->SetFieldDataOn();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2> </FONT><A
href="file://vtkLabeledDataMapper"><FONT color=#000000 face=Arial
size=2>//vtkLabeledDataMapper</FONT></A><FONT face=Arial size=2> *
m_LabeledDataMapper = vtkLabeledDataMapper::New();
[done in constructor]<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>
m_LabeledDataMapper->SetLabelFormat( "%g" );<BR>
m_LabeledDataMapper->SetLabelModeToLabelFieldData();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
m_LabeledDataMapper->SetInput( m_IdFilter->GetPolyDataOutput()
);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2> /</FONT><A
href="file://vtkActor2D"><FONT color=#000000 face=Arial
size=2>/vtkActor2D</FONT></A><FONT face=Arial size=2> * m_Actor2D =
vtkActor2D::New(); [done in
constructor]</FONT></DIV>
<DIV><FONT face=Arial size=2> m_Actor2D->SetMapper(
m_LabeledDataMapper );</FONT></DIV>
<DIV> </DIV></DIV>
<DIV><FONT face=Arial size=2> m_Renderer->AddActor(
m_Actor2D );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2> </FONT><A
href="file://deletion"><FONT color=#000000 face=Arial
size=2>//deletion</FONT></A><FONT face=Arial size=2> are done in
destructor</FONT></DIV></DIV></FONT>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have an access violation due to this code (when
render) in the vtkCommon.dll without understanding why...</FONT></DIV>
<DIV><FONT face=Arial size=2>I know i'm not using any derivative of vtkSource.
Is it the reason ?</FONT></DIV>
<DIV><FONT face=Arial size=2>And then how to make this work ? </FONT><FONT
face=Arial size=2>Thanks in advance for your remarks,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>J. Blocquaux</FONT></DIV>
<DIV><FONT face=Arial size=2>Software developper</FONT></DIV></BODY></HTML>