[Insight-developers] ImageViewer working

George Stetten george@stetten.com
Thu, 17 Oct 2002 06:16:13 -0400


Hi Luis,

The official GLUT website is

http://www.opengl.org/developers/documentation/glut.html?glut#first_hit

GLUT was originally written by Mark Kilgard at SGI, although I believe 
Nate Robins maintains the code now.  
When I showed GlutMaster to Mark a few years back, he liked the 
simplicity of it and added a link to the official website.
Last time I checked, GlutMaster was getting about 10 hits per day, 
though some people may think it is an exercise machine.
The official website for GlutMaster is

http://www.stetten.com/george/glutmaster/glutmaster.html

George

Luis Ibanez wrote:

>
> Hi,
>
> The issues on the ImageViewer seem to be solved
> now.
>
>
> An example on its use was added to
>
>
>     Insight/Examples/ImageViewer
>
>
> It looks pretty much like a filter:
>
> ----------------
>
> typedef itk::ImageViewer< ImageType > ViewerType;
> ViewerType::Pointer viewer = ViewerType::New();
> viewer->SetInput( filter->SetOutput() );
> viewer->Update();
>
> ViewerType::StartInteraction();  // event loop
>
>
> -----------------
>
> So far it supports Scalar images (any type) in
> 2D and 3D. Images are automatically normalized
> to fit in the 0:255 intensity range.
>
> When displaying 3D images the following Key callbacks
> have been defined:
>
> 'f' = forward = go to next slice
> 'b' = back    = go to previous slice
> 'x' = axis X  = cut slices on the YZ plane
> 'y' = axis Y  = cut slices on the XZ plane
> 'z' = axiz z  = cut slices on the XY plane
>
>
> Mouse clicks are returned vie Observers/Command.
> a couple of events are defined in
>
>   Insight/Code/IO/itkImageViewerWindow.h
>
>   - MouseEvent()
>   - KeyPressedEvent()
>
>
> -------------------
>
> The not so good news is that this requires GLUT to
> be installed in your system. This is not an issue
> on Linux. MS-Windows will have to install it as
> binaries or built it from sources. It can be found at
>
>    http://www.xmission.com/~nate/glut.html
>
> Does somebody knows of a more official site ?
>
> ------------
>
> This seems to be the simplest portable way of
> displaying images. Altough GLUT must be installed,
> the process is simpler than using FLTK or QT.
>
>
> GLUT has also "mui" which is a minimal GUI library
> based on OpenGL. It is possible to create menus,
> buttons and scrollbars. It is not the best GUI
> in the world but for the price it is not a bad
> deal.
>
>
> The ImageViewer<> is using George Stetten's GlutMaster
> classes added in Insight/Utilities.
>
>
>
>   Luis
>
>
>
>
>
>
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers


-- 
George Stetten, M.D., Ph.D.
Assistant Professor, Bioengineering, U. Pitt.
Research Scientist, Robotics Institute, CMU
http://www.stetten.com