Deriving from a vtk image class

Brian Alexander Todd bat5 at
Mon Aug 9 11:19:56 EDT 1999

Dear vtk gurus,

I'm dealing with elevation maps which are beautifully
displayed with vtk.  I have been using a separate (non-vtk)
data structure to store and manipulate the data and then
using vtk to display it.  The problem with this is that 
I have to write back to disk and then invoke vtkImageReader,
and on down the pipeline to view updates (in tcl I can't 
manipualate the pointers).  

I would like to use a class derived from a vtk image class
instead and eliminate the disk writes.  I need a new class 
because I have lots of old code that relies on access operators

image[j][i] = ...;

It shouldn't be hard to define this operator in a new class
but what class should I derive from?  My data are a 2D images.  

The textbook (pg 450) said that vtkImageCache was typically 
what was used rather than vtkImageData.  However, the text
book shows vtkImageCache being instantiated and in vtk 2.2
vtkImageCache is a pure abstract class.  Should I use one of
the concretes like vtkImage(Simple,Static)Cache?

Also, once I've read the data into the memory associated with this
class, I would like to Delete vtkImageReader.  Will there be 
problems if the pipeline doensn't begin with a vtkSource?

Brian Todd
  ________|                                                     |________
  \       |   Brian Todd                email: bat5 at |       /
   \      |   N.O.B.L.                 office: (216) 791-2407   |      /
    \     |   C.W.R.U.                   home: (216) 368-4209   |     /
    /     |   Cleveland, OH 44106         fax: (216) 368-4969   |     \
   /      |_____________________________________________________|      \
  /___________)                                              (__________\

This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.

More information about the vtkusers mailing list