[vtkusers] Re: Getting pixel values

Dave Reed dreed at capital.edu
Tue Jul 3 20:32:28 EDT 2001


> Date: Mon, 2 Jul 2001 19:02:41 -0400 (EDT)
> From: David Gobbi <dgobbi at irus.rri.ca>
> 
> On Mon, 2 Jul 2001, Julian wrote:
> 
> > Is there anybody on this list who hasn't written a slice viewer???  Perhaps
> > somebody (of course, not me!) should start a GNU type slice viewer project
> > over at SourceForge.  (Note, I am as guilty of as everybody else of
> > rolling my own)
> 
> For pythonists,
> 
> vtk/python/vtkSliceViewerWidget.py
> vtk/contrib/examplesPython/SliceViewer.py
> vtk/contrib/examplesPython/TextureReslice.py
> http://www.atamai.com/


Excellent - I've been looking for something to view slices that
doesn't flicker like the tcl programs (is there a reason those can't
double-buffer). I both extended and crippled SliceViewer.py and can
make it available for anyone who'd like it.

I added the following:

1. will work nicely with both 8 bit (pgm - e.g., frog) and 16 bit
(e.g., fullHead) data sets

2. will print the coordinate and image value under the mouse pointer

3. allow you to use vtkTransferFunction to map values to colors (or
   just a simple gray scale).

and crippled it (at least temporarily) by taking away the "zoom"
capability.  The zoom requires some extra calculations to calculate
the image value that I haven't yet done.



> The problem that different people have different favorite application
> development languages.  There is no way, for instance, that I would
> be part of an MFC-based viewer project because I don't write MFC
> applications (thank heavens!)
> 
> Perhaps it would be a better idea to add pieces to the imaging pipeline
> that make it easier for people to develop their own image viewing
> applications, regardless of what application language or GUI toolkit
> they use:
> 
> 1) a nice image filter for handling pan/zoom/slice operations
>    (i.e. like vtkImageReslice but with an interface that is better
>    suited to these operations, possibly implemented via vtkImageReslice)
> 
> 2) tools for converting between display coordinates,
>    data coordinates, and voxel indices (to simplify mouse interaction
>    with image)
> 
> 3) tools to probe image values (there was some talk about this
>    recently, vtkImplicitVolume is one possibility but can't handle
>    multi-component images or different interpolation modes)
> 
> I'm currently working on a vtkImageStencilFilter to allow segmentation
> of an image using an existing vtkImplicitFunction or closed
> vtkPolyData surface (hopefully it will be committed this week).


That's what I'd eventually like to do - add the capability to
semi-automatically segment with polylines or curves. Please let me/us
know when you're done.

Dave




More information about the vtkusers mailing list