How can I hide Anatomist main window

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
Manik
Posts: 99
Joined: Fri Mar 05, 2004 1:00 pm
Location: INSERM U836, Grenoble

How can I hide Anatomist main window

Post by Manik »

Hello,

I would like to know if it is possible to hide the main window of Anatomist when using it in a C++ program.
I am programming a tool in C++, and I want it to display a 3D Anatomist window (containing a brain mesh) during the execution.

Using classes Anatomist and Processor, everything works, but the user can see the main Anatomist window (the one with the lists of objects and windows) which is useless for him.

I tried Anatomist::getWindows(), to get a pointer to the window and hide() it, but I cannot access the main window that way.

Is there any way to hide that window and show only a 3D window ?

Thanks a lot,
Manik Bhattacharjee
INSERM U836
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi Manik,

The main window is called "control window" and was originally designed to be optional. But as we never tried not to use it, I don't know if it would actually run without it. Anyway there is always the solution to hide it, which is just what you're trying to do.
There is a pointer on it in the Anatomist class. The following code should work:

Code: Select all

#include <anatomist/application/Anatomist.h>
#include <anatomist/control/wControl.h>
...
ControlWindow *c = theAnatomist->getControlWindow();
if( c )
  c->hide();
Denis
Manik
Posts: 99
Joined: Fri Mar 05, 2004 1:00 pm
Location: INSERM U836, Grenoble

Post by Manik »

Ok thanks, that's exactly what I wanted to do !
Manik Bhattacharjee
INSERM U836
Post Reply