<div class="gmail_quote">On Tue, Aug 7, 2012 at 4:40 AM, Agata Krasoń <span dir="ltr"><<a href="mailto:agatakrason@gmail.com" target="_blank">agatakrason@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi David,<div><br></div><div>I have already wirte this code . On my computer it works well:</div><div><br></div><div>It is for csv files :</div><div>My code here :</div><div><br></div><div><div>vtkDelimitedTextReader* reader = vtkDelimitedTextReader::New();</div>
<div> reader->SetFileName(inputFilename);</div><div> reader->DetectNumericColumnsOn();</div><div> reader->SetFieldDelimiterCharacters(" ");</div><div> reader->Update();</div><div> </div><div> vtkTable* table = reader->GetOutput();</div>
<div> vtkPoints* points = vtkPoints::New();</div><div> vtkDoubleArray* normals = vtkDoubleArray::New();</div><div> </div><div> normals->SetNumberOfComponents(3); </div><div><br></div><div> for(vtkIdType i = 0; i < table->GetNumberOfRows(); i++)</div>
<div> {</div><div> std::cout << " " << (table->GetValue(i,0)).ToDouble();</div><div> </div><div> </div><div> points->InsertNextPoint((table->GetValue(i,0)).ToDouble(),</div><div>
(table->GetValue(i,1)).ToDouble(),</div><div> (table->GetValue(i,2)).ToDouble());</div><div> </div><div> double n[3];</div><div> n[0] = (table->GetValue(i,3)).ToDouble();</div>
<div> n[1] = (table->GetValue(i,4)).ToDouble();</div><div> n[2] = (table->GetValue(i,5)).ToDouble();</div><div> </div><div><br></div><div><span style="white-space:pre-wrap">        </span>std::cout<<" "<<std::endl;</div>
<div><br></div><div> normals->InsertNextTuple(n);</div><div> }</div><div><br></div><div><br></div><div> </div><div> /*std::cout << "There are " << points->GetNumberOfPoints()</div><div>
<< " points." << std::endl; */</div>
<div><br></div><div> vtkPolyData* polydata = vtkPolyData::New();</div><div> polydata->SetPoints(points);</div><div> polydata->GetPointData()->SetNormals(normals);</div><div> vtkVertexGlyphFilter* glyphFilter = vtkVertexGlyphFilter::New();</div>
<div> glyphFilter->SetInputConnection(polydata->GetProducerPort());</div><div> glyphFilter->Update();</div><div><br></div><div>// system("Pause");</div><div><br></div><div> glyphFilter->Delete();</div>
<div> polydata->Delete();</div><div> normals->Delete();</div><div> points->Delete();</div><div> reader->Delete();</div></div><div><br></div><div>But when I am trying to compile for antoher . I received an error ;/</div>
<div>error LNK2019: unresolved external symbol __declspec(dllimport) public: static class vtkDelimitedTextReader * __cdecl vtkDelimitedTextReader::New(void) (__imp_?New@vtkDelimitedTextReader@@SAPAV1@XZ) referenced in function protected: virtual void __thiscall</div>
<div><br></div><div>I don't know what it may be wrong with this code.</div><div>I have the same vtk version 5.8.</div><div>I don't have any idea ;/</div><div><br></div><div><br></div><div>I would appreciate for any help.</div>
<div>Best,</div><div>agatte</div></blockquote><div><br></div>I believe you need to rebuild VTK and turn on INFOVIS.<br clear="all"><br>David</div>