[vtkusers] Please Help!! - Important

Sharbel Dalal sdalal at inter.net.il
Sun May 25 16:53:14 EDT 2003


Hello,

Ive sent this message before, but because of the attachments it was too big
and needed approval. But ill be really glad if someone can look at it
without the attached files and tell me if he/she can find something wrong.

 

Ive written this file with vtk, and I wanted to visualize a structuredpoints
data.

Ive linked to the libs (dll's) in .NET 2003 console application.

 

Ive tried running it with the attached file and I keep getting this error:

 

Unsupported point attribute type: 125 for file: vtkData.vtk

 

I am not an expert in VTK and I am only using it just to visualize this
file.

 

Id really appreciate it if you can help me. And tell me what's wrong with
what I did.

 

Attached are the .cpp and ascii file..

 

And I also pasted the function here

 

 

#ifndef VTK_USE_ANSI_STDLIB

#define VTK_USE_ANSI_STDLIB

#endif

 

 

#include "vtkStructuredPointsReader.h"

#include "vtkImageDataGeometryFilter.h"

#include "vtkWarpScalar.h"

#include "vtkPolyDataMapper.h"

#include "vtkActor.h"

#include "vtkRenderer.h"

#include "vtkRenderWindow.h"

#include "vtkRenderWindowInteractor.h"

 

 

void main()

{

      

 

vtkStructuredPointsReader *reader = vtkStructuredPointsReader::New();

reader->SetFileName("vtkData.vtk");

 

vtkImageDataGeometryFilter *geom = vtkImageDataGeometryFilter::New();

geom->SetInput((vtkImageData*)(reader->GetOutput()));

 

vtkWarpScalar *warp = vtkWarpScalar::New();

warp->SetInput((vtkPointSet*)geom->GetOutput());

 

warp->SetScaleFactor(30.0);

warp->SetNormal(1.0,0,0);

 

vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();

mapper->SetInput((vtkPolyData*)warp->GetOutput());

//mapper->SetInput(

 

vtkActor *actor = vtkActor::New();

actor->SetMapper(mapper);

 

vtkRenderer *ren = vtkRenderer::New();

ren->SetBackground(0.7,0.7,0.7);

ren->AddActor(actor);

 

vtkRenderWindow *renwin = vtkRenderWindow::New();

renwin->AddRenderer(ren);

 

vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();

iren->SetRenderWindow(renwin);

iren->Initialize();

iren->Start();

 

 

 

}

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030525/03a782a4/attachment.htm>


More information about the vtkusers mailing list