[vtkusers] Problem with VolumeMapper & StructuredPointsReader
Amy Henderson
amy.henderson at kitware.com
Thu Jan 29 09:51:45 EST 2004
Hi Hari,
No, just including vtkStructuredPointsReader.h is not enough. In VTK,
unless it is absolutely necessary, in the header file for a given class we
only include the header file for its direct superclass. The rest of the
header files needed by that class are included in the .cxx file. This made
compile times for VTK shorter, but it also means that you will likely have
to include more files in your own code.
- Amy
At 09:13 AM 1/29/2004 -0500, Hari Sundar wrote:
>Hi Amy,
>
>It works now, but I am a bit confused. Shouldn't including
>vtkStructuredPointsReader be enough ? Doesn't it include
>vtkStructuredPoints ? This particular case is simple enough, but what
>would be the general rule for including headers ?
>
>thanks,
>-Hari
>
>On Thu, 29 Jan 2004, Amy Henderson wrote:
>
> > Hi Hari,
> >
> > Did you include the header file for
> > vtkStructuredPoints? vtkStructuredPoints is a subclass of vtkImageData,
> > but your code will need to have vtkStructuredPoints.h included to know
> that.
> >
> > - Amy
> >
> > At 07:53 PM 1/28/2004 -0500, Hari Sundar wrote:
> > >Hi,
> > >
> > >I was trying to do something as simple as converting one of the Python/Tcl
> > >examples into Cxx ... SimpleTextureMape2D.py ... the python example works
> > >...
> > >
> > >this is how my Cxx code (relevant part) looks ...
> > >
> > >vtkStructuredPointsReader *reader = vtkStructuredPointsReader::New();
> > >reader->SetFileName("ironProt.vtk");
> > >
> > >vtkVolumeTextureMapper2D *volumeMapper = vtkVolumeTextureMapper2D::New();
> > >volumeMapper->SetInput(reader->GetOutput());
> > >
> > >when I compile this .. I get this error ,,,
> > >
> > >simple.cxx:104: no matching function for call to
> > >`vtkVolumeTextureMapper2D::
> > > SetInput(vtkStructuredPoints*)'
> > >/usr/local/src/VTK-4.2/Rendering/vtkVolumeMapper.h:59: candidates are:
> > >virtual
> > > void vtkVolumeMapper::SetInput(vtkImageData*)
> > >
> > >what did I do wrong ???
> > >
> > >thanks,
> > >-Hari
> > >_______________________________________________
> > >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
> >
>
>-----------------------------------------------------------------------
> Home Work
>-----------------------------------------------------------------------
> 375-C Buell Apartments, Dept. of ECE
> 23909 BPO Way, Rutgers University
> Rutgers University, 96 Frelinghuysen Road
> Piscataway, NJ 08854 Piscataway, NJ 08854
> ph: (732)878 0424 ph: (732)445 0564
>-----------------------------------------------------------------------
More information about the vtkusers
mailing list