[vtkusers] Problem with reader->Update();
Arun Kharghoria
kharghora at yahoo.com
Tue Apr 6 10:35:38 EDT 2004
Dear Varadhan:
Thanks a lot for the mail and the suggestion. I
implemented your suggestion ,i.e. modified my code as
below:
reader->SetFileName("test.vtk") ;
reader->Update() ;
-----
mapper->SetInput(reader->GetOutput());
But still I get the same error msg. Any clue?
BTW, this is my first VTK trial, so may be I am
missing something.
Thanks again.
-Arun
--- Veerapuram Varadhan
<v.varadhan at californiadigital.com> wrote:
> Hi Arun,
>
> After reader->SetFileName("test.vtk") you have to
> call reader->Update() to
> actually read the contents of the file.
>
> mapper->SetInput(reader->GetOutput()); fails because
> reader->GetOutput()
> will be essentially NULL (IIRC) since the content is
> not yet read in your
> case.
>
> Try adding the line
> reader->Update();
>
> before
>
> mapper->SetInput(reader->GetOutput());
>
> HTH,
>
> V. Varadhan.
>
> > Dear All:
> >
> > I am using VTK4.2 with Borland Builder 5.0.
> >
> > I am trying the following code and getting an
> > exception ('Exception Object Address:0xC0FEE6')in
> the
> > line
> >
> > mapper->SetInput(reader->GetOutput());
> >
> > and it is pointing to
> >
> > USEFACET.H routine.
> >
> > I'll be glad if somebody could give me an idea to
> get
> > around with this problem. (I am also giving the
> > 'test.vtk' data file at the end of the mail).
> >
> > Thanks a lot.
> > -AK
> >
> > ****code**
> >
> > vtkDataSetReader *reader;
> > vtkDataSetMapper *mapper;
> > vtkActor *outlineActor;
> >
> > reader = vtkDataSetReader::New();
> > reader->SetFileName("test.vtk");
> >
> > mapper = vtkDataSetMapper::New();
> > mapper->SetInput(reader->GetOutput());
> >
> > ----
> > ----
> > *** end of code **
> >
> > test.vtk
> >
> > # vtk DataFile Version 2.0
> > Volume example
> > ASCII
> > DATASET STRUCTURED_POINTS
> > DIMENSIONS 3 4 6
> > ASPECT_RATIO 1 1 1
> > ORIGIN 0 0 0
> > POINT_DATA 72
> > SCALARS volume_scalars char 1
> > LOOKUP_TABLE default
> > 0 0 0 0 0 0 0 0 0 0 0 0
> > 0 5 10 15 20 25 25 20 15 10 5 0
> > 0 10 20 30 40 50 50 40 30 20 10 0
> > 0 10 20 30 40 50 50 40 30 20 10 0
> > 0 5 10 15 20 25 25 20 15 10 5 0
> > 0 0 0 0 0 0 0 0 0 0 0 0
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business $15K Web Design Giveaway
> > http://promotions.yahoo.com/design_giveaway/
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
=====
Arun Kharghoria {972.826.0861 (H)}
6600 Preston Rd, Apt 826
Plano, TX 75024
USA
http://members.tripod.com/~arunworld
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
More information about the vtkusers
mailing list