[vtkusers] VTK!

Sharbel Dalal sdalal at inter.net.il
Mon May 26 02:42:20 EDT 2003


Hello,

I am just following up on my last post, regarding the error I keep getting
running the program I posted, if someone could get back to me that would be
great.

Thanks 

Sharbel Dalal

 

#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/20030526/df9489e0/attachment.htm>


More information about the vtkusers mailing list