anatomist  5.1.2
3D neuroimaging data viewer
AWindow3D Class Reference

3D window, OpenGL rendering More...

#include <anatomist/window3D/window3D.h>

Inheritance diagram for AWindow3D:
Collaboration diagram for AWindow3D:

Classes

class  ObjectModifier
 Functions that can modify on-the-fly display primitives of an object. More...
 

Public Types

enum  ViewType {
  Oblique , Axial , Sagittal , Coronal ,
  ThreeD
}
 
enum  RenderingMode {
  Normal , Wireframe , Outlined , HiddenWireframe ,
  Fast
}
 
enum  ClipMode { NoClip , Single , Double }
 
typedef anatomist::GLWidgetManager *(* GLWidgetCreator) (anatomist::AWindow *win, QWidget *parent, const char *name, const QGLWidget *shareWidget, Qt::WindowFlags f)
 
- Public Types inherited from anatomist::AWindow
enum  Type { CTRL_WINDOW = 100 , WINDOW_2D = 101 , WINDOW_3D = 102 }
 
enum  SubType {
  AXIAL_WINDOW = 200 , SAGITTAL_WINDOW = 201 , CORONAL_WINDOW = 202 , OBLIQUE_WINDOW = 203 ,
  OTHER = 299
}
 
enum  RecordingState { OFF , ON , DISABLED }
 
- Public Types inherited from carto::RCObject
typedef int RefCounterType
 

Public Slots

virtual void polish ()
 
void resizeView ()
 
void changeSlice (int)
 
void changeTime (int)
 
void changeTimeSliders (int, int)
 
void changeReferential ()
 
void muteAxial ()
 
void muteCoronal ()
 
void muteSagittal ()
 
void muteOblique ()
 
void mute3D ()
 
void lightView ()
 
void pointsOfView ()
 
void tools ()
 
void syncViews (bool keepextrema=false)
 
void focusView ()
 
void toolsWinDestroyed ()
 
void povWinDestroyed ()
 
void lightWinDestroyed ()
 
virtual void Refresh ()
 
virtual void refreshNow ()
 Refresh the window (redraw the contained objects). More...
 
void refreshTemp ()
 Redraws temporary objects only. More...
 
void refreshTempNow ()
 
void refreshLightView ()
 Only redraws existing objects (in most cases, just calls existing OpenGL lists, except for observer-dependent objects) More...
 
void refreshLightViewNow ()
 
void setAutoRotationCenter ()
 
void askZoom ()
 
float getZoom () const
 
int getSliceSliderPosition ()
 
int getTimeSliderPosition ()
 
int getSliceSliderMaxPosition ()
 
int getTimeSliderMaxPosition ()
 
void setSliceSliderPosition (int position)
 
void setTimeSliderPosition (int position)
 
void switchToolbox ()
 
void setLinkedCursorPos ()
 
void openStereoView ()
 
void toggleStatusBarVisibility ()
 
bool toopTipsEnabled () const
 
void enableToolTips (bool)
 
void resizeEvent (QResizeEvent *)
 
QImage snapshotImage (int width=0, int height=0, int bufmode=0)
 Get a snapshot of the window, after a refresh if needed. More...
 
virtual carto::rc_ptr< anatomist::ViewStateviewState ()
 
- Public Slots inherited from ControlledWindow
virtual void activeControlChanged (QAction *)
 
virtual void updateControls ()
 
- Public Slots inherited from QAWindow
virtual void refreshNow ()
 Real drawing function, replacing AWindow::Refresh in subclasses of QAWindow - Don't forget to call QAWindow::refreshNow from overloaded functions. More...
 
virtual bool needsRedraw () const
 
virtual void detach ()
 detach view from a block More...
 
virtual void toggleToolBars ()
 
virtual void toggleFullScreen ()
 
void triggeredRefresh ()
 calls refreshNow() and cleanup More...
 

Signals

void refreshed ()
 
void sliderChanged (int dim, int slice)
 
void orientationChanged ()
 

Public Member Functions

 AWindow3D (ViewType t=Oblique, QWidget *parent=0, carto::Object params=carto::none(), Qt::WindowFlags f=Qt::WindowFlags())
 
virtual ~AWindow3D ()
 
virtual Type type () const
 Get the window type (2D, 3D or control) More...
 
virtual SubType subtype () const
 
virtual void registerObject (anatomist::AObject *obj, bool temporaryObject=false, int position=-1)
 
virtual void unregisterObject (anatomist::AObject *obj)
 
virtual bool positionFromCursor (int x, int y, Point3df &pos)
 Translates mouse position to Anatomist geometry position. More...
 
virtual anatomist::AObjectobjectAtCursorPosition (int x, int y)
 pick the object at the cursor 2D position More...
 
virtual std::list< anatomist::AObject * > * objectsAtCursorPosition (int x, int y, int tolerenceRadius)
 pick several objects at the cursor 2D position More...
 
virtual int polygonAtCursorPosition (int x, int y, const anatomist::AObject *obj)
 pick a polygon on a selected object at the cursor 2D position More...
 
int computeNearestVertexFromPolygonPoint (const anatomist::ViewState &vs, int poly, const anatomist::GLComponent *glc, const Point3df &position, Point3df &positionNearestVertex)
 print all infos about vertex picked on a polygon selected More...
 
void getInfos3DFromClickPoint (int x, int y, Point3df &position, int *poly, anatomist::AObject *objselect, std::string &objtype, std::vector< float > &texvalue, std::string &textype, Point3df &positionNearestVertex, int *indexNearestVertex, std::vector< std::string > &texlabels)
 
void getInfos3DFromPosition (const std::vector< float > &position, int poly, anatomist::AObject *objselect, std::string &objtype, std::vector< float > &texvalue, std::string &textype, Point3df &positionNearestVertex, int *indexNearestVertex, std::vector< std::string > &texlabels)
 same as above but from a 3+D position. More...
 
bool surfpaintIsVisible ()
 
void setVisibleSurfpaint (bool b)
 
bool constraintEditorIsActive ()
 
void setActiveConstraintEditor (bool b)
 
void loadConstraintData (const std::vector< std::string > &constraintList, int constraintType, anatomist::AObject *texConstraint)
 
std::vector< std::string > getConstraintList ()
 
int getConstraintType () const
 
anatomist::AObjectgetConstraintTexture ()
 
void printPositionAndValue ()
 
void displayInfoAtClickPosition (int x, int y)
 
std::string displayInfoAtClickPositionAsText (int x, int y, bool html=false)
 
virtual void displayClickPoint ()
 
void setViewPoint (float *quaternion, const float zoom)
 set the view of the scene More...
 
anatomist::Lightlight ()
 
void setLight (const anatomist::Light &light)
 
void setOrientationCube (bool state)
 Compass handling methods. More...
 
bool hasOrientationCube () const
 
void setBoundingFrame (bool state)
 Frame handling methods. More...
 
bool hasBoundingFrame () const
 
void setRenderingMode (RenderingMode mode)
 Rendering mode (normal, wireframe, fast) More...
 
RenderingMode renderingMode () const
 
virtual const std::set< unsigned > & typeCount () const
 
virtual std::set< unsigned > & typeCount ()
 
virtual const std::string & baseTitle () const
 
virtual void setPosition (const Point3df &position, const anatomist::Referential *orgref)
 Set position of cursor. More...
 
virtual void setPosition (const std::vector< float > &position, const anatomist::Referential *orgref)
 
virtual void updateWindowGeometry ()
 adapts geometry to the current contents and referential More...
 
virtual anatomist::Viewview ()
 
virtual const anatomist::Viewview () const
 
virtual void setViewType (ViewType t)
 Mute into a new view type (Axial, Sagittal, Coronal or Oblique) More...
 
ViewType viewType () const
 
bool isViewOblique () const
 
bool perspectiveEnabled () const
 
void enablePerspective (bool)
 
const aims::QuaternionsliceQuaternion () const
 
void setSliceQuaternion (const aims::Quaternion &q)
 
void setSliceOrientation (const Point3df &normal)
 
void resizeView (int w, int h)
 Tries to resize the viewing area to given size. More...
 
bool boundingBox (std::vector< float > &bmin, std::vector< float > &bmax) const
 Get bounding box in N-dimension mode (new in anatomist 4.6) More...
 
ClipMode clipMode () const
 
void setClipMode (ClipMode m)
 
float clipDistance () const
 
void setClipDistance (float d)
 
bool transparentZEnabled () const
 
void enableTransparentZ (bool)
 
bool cullingEnabled () const
 
void setCulling (bool)
 
bool flatShading () const
 
void setFlatShading (bool)
 
bool smoothing () const
 
void setSmoothing (bool)
 
void setFog (bool)
 
bool fog () const
 
virtual void setReferential (anatomist::Referential *ref)
 
virtual void update (const Observable *obs, void *)
 
void setLinkedCursorOnSliderChange (bool x)
 
bool linkedCursorOnSliderChange () const
 
AWindow3DleftEyeWindow ()
 
AWindow3DrightEyeWindow ()
 
void setLeftEyeWindow (AWindow3D *)
 
void setRightEyeWindow (AWindow3D *)
 
virtual void showToolBars (int state=2)
 Shows or hides all tools (menu, toolbars) around the main view area. More...
 
virtual void showStatusBar (int state=2)
 
QSlider * getSliceSlider (void) const
 
void renderAfter (anatomist::AObject *obj, anatomist::AObject *afterthis)
 adds a rendering order constraint: obj will be rendered immediately after afterthis. More...
 
void renderBefore (anatomist::AObject *obj, anatomist::AObject *beforethis)
 adds a rendering order constraint: obj will be rendered immediately before beforethis. More...
 
std::list< anatomist::AObject * >::iterator processRenderingOrder (std::list< anatomist::AObject * > &opaque) const
 calculates the objects rendering order, according to various constraints (opaque/transparent, order at register time, before/after constraints). More...
 
bool polygonsSortingEnabled () const
 
void setPolygonsSortingEnabled (bool)
 
bool polygonsSortingDirection () const
 returns false for back-to-front, true for front-to-back More...
 
void setPolygonsSortingDirection (bool dir)
 
virtual void sortPolygons (bool force=false)
 
void renderSelectionBuffer (anatomist::ViewState::glSelectRenderMode mode, const anatomist::AObject *selectedobject=0)
 
- Public Member Functions inherited from ControlledWindow
 ControlledWindow (QWidget *parent=0, const char *name=0, carto::Object options=carto::none(), Qt::WindowFlags f=Qt::WindowFlags())
 
virtual ~ControlledWindow ()
 
virtual void updateAvailableControls ()
 
virtual void updateActivableControls ()
 
virtual void updateActions ()
 
virtual void updateActiveControl ()
 
std::map< std::string, QAction * > getControlButtonObjects (void)
 
- Public Member Functions inherited from QAWindow
 QAWindow (QWidget *parent=0, const char *name=0, carto::Object params=carto::none(), Qt::WindowFlags f=Qt::WindowFlags())
 
virtual ~QAWindow ()
 
virtual void setGeometry (int x, int y, unsigned w, unsigned h)
 
virtual void geometry (int *x, int *y, unsigned *w, unsigned *h)
 Get position and dimensions of the window. More...
 
virtual void show ()
 
virtual void hide ()
 
virtual void iconify ()
 
virtual void unIconify ()
 
virtual bool close ()
 
void setFullScreen (int state=2)
 
bool isFullScreen () const
 
virtual void setTitle (const std::string &name)
 
virtual void enableDetachMenu (bool x)
 
void Refresh ()
 In QAWindows, Refresh() doesn't redraw right now. More...
 
virtual QToolBar * addToolBar (const QString &title, const QString &name)
 
virtual QToolBar * addToolBar (Qt::ToolBarArea area, const QString &title, const QString &name)
 
virtual void addToolBar (QToolBar *, const QString &name)
 
virtual void addToolBar (Qt::ToolBarArea area, QToolBar *toolbar, const QString &name)
 
virtual QToolBar * insertToolBar (int pos, Qt::ToolBarArea area, const QString &title, const QString &name)
 
virtual void removeToolBar (QToolBar *toolbar)
 
virtual QToolBar * removeToolBar (const QString &name)
 
QToolBar * toolBar (const QString &name)
 
void setDetachMenuAction (QAction *)
 
- Public Member Functions inherited from anatomist::AWindow
virtual ~AWindow ()
 Unregisters from the application and other objects. More...
 
void displayTalairach ()
 Affiche les coordonnees de Talairach qui correspondent a la position du curseur lie (window 2D) More...
 
virtual bool toolBarsVisible () const
 
virtual void setupWindow ()
 Sets correct size and lookup of the window. More...
 
virtual std::string Title () const
 
void setId (int id)
 Set the window identifier. More...
 
void SetRefreshFlag ()
 Set the refresh flag on. More...
 
void ResetRefreshFlag ()
 Set the refresh flag off. More...
 
bool lookupChanged () const
 
void setLookupChanged (bool flg=true)
 
int id () const
 Get the window identifier. More...
 
bool RefreshFlag () const
 Get the refresh flag status. More...
 
std::set< AObject * > Objects () const
 Get the objects. More...
 
bool hasObject (AObject *obj) const
 
virtual Point3df getPosition () const
 Get position of cursor. More...
 
float getTime () const
 Get time position of cursor. More...
 
virtual std::vector< float > getFullPosition () const
 
virtual void setTime (float time)
 Set time position of cursor. More...
 
ReferentialgetReferential () const
 
GeometrywindowGeometry () const
 
void setWindowGeometry (Geometry *geom)
 
int Group () const
 
void setGroup (int group)
 
void setHasCursor (int hasCursor)
 
bool hasCursor () const
 takes both the global and own flags into account More...
 
int hasSelfCursor () const
 returns the own flag of the window (see hasGlobalCursor) (tri-state) More...
 
virtual AObjectobjectAt (const std::vector< float > &pos)
 
virtual void selectObject (const std::vector< float > &pos, int modifier)
 Selects (highlights) object at a given 4D space position. More...
 
virtual void button3clicked (int x, int y)
 handles button3 click (menu) More...
 
virtual void findObjectsAt (const std::vector< float > &pos, std::set< AObject * > &shown, std::set< AObject * > &hidden)
 finds objects at given position (internal) More...
 
virtual void update (const Observable *observable, void *arg)
 This method is called whenever the observed object is changed. More...
 
virtual void recordImages ()
 
virtual RecordingState recordingState () const
 
virtual void startRecord ()
 
virtual void startRecord (const std::string &filename)
 
virtual void stopRecord ()
 
virtual bool needsRedraw () const
 returns true if a refresh has been triggered and not performed yet (in subclasses: AWindow always returns false) More...
 
bool isTemporary (AObject *o) const
 
const std::set< AObject * > & temporaryObjects () const
 
- Public Member Functions inherited from carto::SharedObject
 SharedObject ()
 
 SharedObject (const SharedObject &x)
 
virtual ~SharedObject ()
 
SharedObjectoperator= (const SharedObject &)
 
bool testDeletable ()
 
bool tryDelete ()
 
- Public Member Functions inherited from carto::WeakObject
void attachWeakPtr (weak_ptr< T > &) const
 
void detachWeakPtr (weak_ptr< T > &) const
 
void attachWeakPtr (weak_shared_ptr< T > &) const
 
void detachWeakPtr (weak_shared_ptr< T > &) const
 
virtual ~WeakObject ()
 
- Public Member Functions inherited from carto::RCObject
 RCObject ()
 
 RCObject (const RCObject &)
 
RCObjectoperator= (const RCObject &)
 
virtual ~RCObject ()
 
- Public Member Functions inherited from anatomist::Observer
virtual ~Observer ()
 
- Public Member Functions inherited from anatomist::ControlSwitchObserver
 ControlSwitchObserver ()
 
virtual ~ControlSwitchObserver ()
 
- Public Member Functions inherited from anatomist::Observable
 Observable ()
 Construct an Observable with zero observers. More...
 
virtual ~Observable ()
 does nothing More...
 
void addObserver (Observer *observer)
 Adds an observer to the set of observers for this object. More...
 
void deleteObserver (Observer *observer)
 Deletes an observer from the set of observers of this object. More...
 
void deleteObservers ()
 Clears the observer list so that this object no longer has any observers (doesn't call any observer method - see notifyUnregisterObservers() for this ) More...
 
int countObservers () const
 Returns the number of observers of this object. More...
 
virtual void notifyObservers (void *arg=0)
 If this object has changed, as indicated by the hasChanged method, then notify all of its observers. More...
 
virtual void notifyUnregisterObservers ()
 Notifies observable destruction to all observers and unregisters them. More...
 
bool hasChanged () const
 Tests if this object has changed. More...
 
bool obsHasChanged (int) const
 only valid during an Observer::update() More...
 
bool obsHasChanged (const std::string &) const
 only valid during an Observer::update() More...
 
void setChanged () const
 Indicates that this object has changed. More...
 

Static Public Member Functions

static anatomist::Geometry setupWindowGeometry (const std::list< carto::shared_ptr< anatomist::AObject > > &objects, const aims::Quaternion &slicequat, const anatomist::Referential *wref=0, QGLWidget *glw=0, bool with3d=false)
 
static void setGLWidgetCreator (GLWidgetCreator)
 hook to create inherited QAGLWidgets (Vtk-enabled for instance) More...
 
- Static Public Member Functions inherited from anatomist::AWindow
static void setLeftRightDisplay (bool state)
 
static int leftRightDisplay ()
 
static void setLeftRightDisplaySize (int size)
 
static int leftRightDisplaySize ()
 
static void setDisplayedAnnotations (const std::vector< std::string > &annotation_list)
 
static std::vector< std::string > displayedAnnotations ()
 
static void setGlobalHasCursor (bool hasCursor)
 
static int hasGlobalCursor ()
 
static void setCursorSize (int cursorSize)
 
static int cursorSize ()
 
static void setUseDefaultCursorColor (bool state)
 Set the default color cursor flag. More...
 
static int useDefaultCursorColor ()
 Give the default color cursor flag. More...
 
static void setCursorColor (const AimsRGB &cursCol)
 Set the color cursor. More...
 
static AimsRGB cursorColor ()
 Give the color cursor. More...
 
static float selectTolerence ()
 Selection tolerence distance. More...
 
static void setSelectTolerence (float tol)
 Set the selection tolerence distance. More...
 
static void recordCbk (void *clientdata)
 

Protected Slots

void freeResize ()
 
void saveSnapshot ()
 
void saveSnapshotWithCustomSize ()
 

Protected Member Functions

void showReferential ()
 
void updateLeftRightAnnotations ()
 
void displayClickPos (Point3df clickPos)
 Display the click point. More...
 
void setupTimeSlider (const std::vector< float > &bmin, const std::vector< float > &bmax)
 
void setupSliceSlider (float mins, float maxs)
 
void setupSliceSlider ()
 
void updateViewTypeToolBar ()
 
void updateObject (anatomist::AObject *obj, anatomist::PrimList *pl=0, anatomist::ViewState::glSelectRenderMode selectmode=anatomist::ViewState::glSELECTRENDER_NONE)
 
void updateObject2D (anatomist::AObject *obj, anatomist::PrimList *pl=0, anatomist::ViewState::glSelectRenderMode selectmode=anatomist::ViewState::glSELECTRENDER_NONE)
 
void updateObject3D (anatomist::AObject *obj, anatomist::PrimList *pl=0, anatomist::ViewState::glSelectRenderMode selectmode=anatomist::ViewState::glSELECTRENDER_NONE)
 
anatomist::GLPrimitives cursorGLL () const
 
int updateSliceSlider ()
 
void updateTimeSliders ()
 
void registerObjectModifier (ObjectModifier *mod)
 Allows changing display lists from normal objects DLists. More...
 
void unregisterObjectModifier (ObjectModifier *mod)
 
bool autoFusion2D (anatomist::AObject *obj)
 build or modify the auto Fusion2D object when adding a new object. More...
 
void removeFromAutoFusion2D (anatomist::AObject *obj)
 delete or modify the auto Fusion2D object when removing an object More...
 
bool inAutoFusion (const anatomist::AObject *obj) const
 
- Protected Member Functions inherited from QAWindow
virtual void createTitle ()
 Creates a new title for the window. More...
 
virtual void dragEnterEvent (QDragEnterEvent *)
 
virtual void dragMoveEvent (QDragMoveEvent *)
 
virtual void dropEvent (QDropEvent *)
 
virtual void mouseMoveEvent (QMouseEvent *e)
 
virtual void closeEvent (QCloseEvent *event)
 
- Protected Member Functions inherited from anatomist::AWindow
 AWindow ()
 AWindow constructor registers itself in the application. More...
 
void setWindowTitle ()
 Set the title of the window. More...
 
virtual void unregisterObservable (Observable *obs)
 Called when an observable is destroyed, only called by Observable: don't use this function directly. More...
 
void manageAutoReferential ()
 automatically set the contained objects referential to the window if it has not been set manually, and if all objetcs share the same referential. More...
 
- Protected Member Functions inherited from carto::SharedObject
void disableRefCount ()
 
- Protected Member Functions inherited from carto::WeakObject
 WeakObject ()
 
 WeakObject (const WeakObject &)
 
WeakObjectoperator= (const WeakObject &)
 
- Protected Member Functions inherited from anatomist::Observer
virtual void cleanupObserver ()
 call this function from inherited classes destructors. More...
 
virtual void registerObservable (Observable *)
 only called by Observable: don't use this function directly More...
 
const std::set< Observable * > & observed () const
 
- Protected Member Functions inherited from anatomist::Observable
void clearChanged () const
 Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change. More...
 
void obsSetChanged (int, bool=true) const
 int-based change flags (use enums to address them) More...
 
void obsSetChanged (const std::string &, bool=true) const
 string-based change flags More...
 

Static Protected Attributes

static std::set< unsigned > _count3d
 3D windows static counter More...
 
static std::string _baseTitle
 

Friends

class anatomist::internal::AGraphicsView
 

Additional Inherited Members

- Protected Attributes inherited from anatomist::AWindow
int _id
 Window identificator. More...
 
bool _refresh
 Should the window be refreshed? More...
 
bool _lookupChanged
 Lookup has changed (title or geometry) More...
 
std::list< carto::shared_ptr< AObject > > _objects
 List of the objects contained in the window. More...
 
std::set< AObject * > _sobjects
 Same but as a set (for fast search) More...
 
std::set< AObject * > _tempObjects
 
std::vector< float > _timepos
 Cursor time + next dimensions. More...
 
Referential_referential
 Referentiel. More...
 
Geometry_geometry
 Geometry. More...
 
std::string _title
 Title of the window. More...
 
int _instNumber
 Number of instance of the window class. More...
 
int _group
 Group number, for linked windows. More...
 
Point3df _position
 Click position. More...
 

Detailed Description

3D window, OpenGL rendering

Definition at line 73 of file window3D.h.

Member Typedef Documentation

◆ GLWidgetCreator

typedef anatomist::GLWidgetManager*(* AWindow3D::GLWidgetCreator) (anatomist::AWindow *win, QWidget *parent, const char *name, const QGLWidget *shareWidget, Qt::WindowFlags f)

Definition at line 254 of file window3D.h.

Member Enumeration Documentation

◆ ClipMode

Enumerator
NoClip 
Single 
Double 

Definition at line 96 of file window3D.h.

◆ RenderingMode

Enumerator
Normal 
Wireframe 
Outlined 
HiddenWireframe 
Fast 

Definition at line 87 of file window3D.h.

◆ ViewType

Enumerator
Oblique 
Axial 
Sagittal 
Coronal 
ThreeD 

Definition at line 78 of file window3D.h.

Constructor & Destructor Documentation

◆ AWindow3D()

AWindow3D::AWindow3D ( ViewType  t = Oblique,
QWidget *  parent = 0,
carto::Object  params = carto::none(),
Qt::WindowFlags  f = Qt::WindowFlags() 
)

◆ ~AWindow3D()

virtual AWindow3D::~AWindow3D ( )
virtual

Member Function Documentation

◆ askZoom

void AWindow3D::askZoom ( )
slot

◆ autoFusion2D()

bool AWindow3D::autoFusion2D ( anatomist::AObject obj)
protected

build or modify the auto Fusion2D object when adding a new object.

Returns true if the object is actually added to the auto fusion.

◆ baseTitle()

virtual const std::string& AWindow3D::baseTitle ( ) const
virtual

Reimplemented from anatomist::AWindow.

◆ boundingBox()

bool AWindow3D::boundingBox ( std::vector< float > &  bmin,
std::vector< float > &  bmax 
) const

Get bounding box in N-dimension mode (new in anatomist 4.6)

◆ changeReferential

void AWindow3D::changeReferential ( )
slot

◆ changeSlice

void AWindow3D::changeSlice ( int  )
slot

◆ changeTime

void AWindow3D::changeTime ( int  )
slot

◆ changeTimeSliders

void AWindow3D::changeTimeSliders ( int  ,
int   
)
slot

◆ clipDistance()

float AWindow3D::clipDistance ( ) const

◆ clipMode()

ClipMode AWindow3D::clipMode ( ) const

◆ computeNearestVertexFromPolygonPoint()

int AWindow3D::computeNearestVertexFromPolygonPoint ( const anatomist::ViewState vs,
int  poly,
const anatomist::GLComponent glc,
const Point3df position,
Point3df positionNearestVertex 
)

print all infos about vertex picked on a polygon selected

◆ constraintEditorIsActive()

bool AWindow3D::constraintEditorIsActive ( )

◆ cullingEnabled()

bool AWindow3D::cullingEnabled ( ) const

◆ cursorGLL()

anatomist::GLPrimitives AWindow3D::cursorGLL ( ) const
protected

◆ displayClickPoint()

virtual void AWindow3D::displayClickPoint ( )
virtual

Reimplemented from anatomist::AWindow.

◆ displayClickPos()

void AWindow3D::displayClickPos ( Point3df  clickPos)
protected

Display the click point.

◆ displayInfoAtClickPosition()

void AWindow3D::displayInfoAtClickPosition ( int  x,
int  y 
)

◆ displayInfoAtClickPositionAsText()

std::string AWindow3D::displayInfoAtClickPositionAsText ( int  x,
int  y,
bool  html = false 
)

◆ enablePerspective()

void AWindow3D::enablePerspective ( bool  )

◆ enableToolTips

void AWindow3D::enableToolTips ( bool  )
slot

◆ enableTransparentZ()

void AWindow3D::enableTransparentZ ( bool  )

◆ flatShading()

bool AWindow3D::flatShading ( ) const

◆ focusView

void AWindow3D::focusView ( )
slot

◆ fog()

bool AWindow3D::fog ( ) const

◆ freeResize

void AWindow3D::freeResize ( )
protectedslot

◆ getConstraintList()

std::vector<std::string> AWindow3D::getConstraintList ( )

◆ getConstraintTexture()

anatomist::AObject* AWindow3D::getConstraintTexture ( )

◆ getConstraintType()

int AWindow3D::getConstraintType ( ) const

◆ getInfos3DFromClickPoint()

void AWindow3D::getInfos3DFromClickPoint ( int  x,
int  y,
Point3df position,
int *  poly,
anatomist::AObject objselect,
std::string &  objtype,
std::vector< float > &  texvalue,
std::string &  textype,
Point3df positionNearestVertex,
int *  indexNearestVertex,
std::vector< std::string > &  texlabels 
)

◆ getInfos3DFromPosition()

void AWindow3D::getInfos3DFromPosition ( const std::vector< float > &  position,
int  poly,
anatomist::AObject objselect,
std::string &  objtype,
std::vector< float > &  texvalue,
std::string &  textype,
Point3df positionNearestVertex,
int *  indexNearestVertex,
std::vector< std::string > &  texlabels 
)

same as above but from a 3+D position.

The polygon "poly" must be provided if info about vertices are to be retreived, because we cannot guess it from the 3D position. If poly is negative, no vertex info will be provided.

◆ getSliceSlider()

QSlider* AWindow3D::getSliceSlider ( void  ) const

◆ getSliceSliderMaxPosition

int AWindow3D::getSliceSliderMaxPosition ( )
slot

◆ getSliceSliderPosition

int AWindow3D::getSliceSliderPosition ( )
slot

◆ getTimeSliderMaxPosition

int AWindow3D::getTimeSliderMaxPosition ( )
slot

◆ getTimeSliderPosition

int AWindow3D::getTimeSliderPosition ( )
slot

◆ getZoom

float AWindow3D::getZoom ( ) const
slot

◆ hasBoundingFrame()

bool AWindow3D::hasBoundingFrame ( ) const

◆ hasOrientationCube()

bool AWindow3D::hasOrientationCube ( ) const

◆ inAutoFusion()

bool AWindow3D::inAutoFusion ( const anatomist::AObject obj) const
protected

◆ isViewOblique()

bool AWindow3D::isViewOblique ( ) const

◆ leftEyeWindow()

AWindow3D* AWindow3D::leftEyeWindow ( )

◆ light()

anatomist::Light* AWindow3D::light ( )

◆ lightView

void AWindow3D::lightView ( )
slot

◆ lightWinDestroyed

void AWindow3D::lightWinDestroyed ( )
slot

◆ linkedCursorOnSliderChange()

bool AWindow3D::linkedCursorOnSliderChange ( ) const

◆ loadConstraintData()

void AWindow3D::loadConstraintData ( const std::vector< std::string > &  constraintList,
int  constraintType,
anatomist::AObject texConstraint 
)

◆ mute3D

void AWindow3D::mute3D ( )
slot

◆ muteAxial

void AWindow3D::muteAxial ( )
slot

◆ muteCoronal

void AWindow3D::muteCoronal ( )
slot

◆ muteOblique

void AWindow3D::muteOblique ( )
slot

◆ muteSagittal

void AWindow3D::muteSagittal ( )
slot

◆ objectAtCursorPosition()

virtual anatomist::AObject* AWindow3D::objectAtCursorPosition ( int  x,
int  y 
)
virtual

pick the object at the cursor 2D position

Reimplemented in anatomist::RefWindow.

◆ objectsAtCursorPosition()

virtual std::list<anatomist::AObject*>* AWindow3D::objectsAtCursorPosition ( int  x,
int  y,
int  tolerenceRadius 
)
virtual

pick several objects at the cursor 2D position

◆ openStereoView

void AWindow3D::openStereoView ( )
slot

◆ orientationChanged

void AWindow3D::orientationChanged ( )
signal

◆ perspectiveEnabled()

bool AWindow3D::perspectiveEnabled ( ) const

◆ pointsOfView

void AWindow3D::pointsOfView ( )
slot

◆ polish

virtual void AWindow3D::polish ( )
virtualslot

◆ polygonAtCursorPosition()

virtual int AWindow3D::polygonAtCursorPosition ( int  x,
int  y,
const anatomist::AObject obj 
)
virtual

pick a polygon on a selected object at the cursor 2D position

◆ polygonsSortingDirection()

bool AWindow3D::polygonsSortingDirection ( ) const

returns false for back-to-front, true for front-to-back

◆ polygonsSortingEnabled()

bool AWindow3D::polygonsSortingEnabled ( ) const

◆ positionFromCursor()

virtual bool AWindow3D::positionFromCursor ( int  x,
int  y,
Point3df pos 
)
virtual

Translates mouse position to Anatomist geometry position.

Returns
false if posision cannot be computed (out of viewport)

Reimplemented from anatomist::AWindow.

◆ povWinDestroyed

void AWindow3D::povWinDestroyed ( )
slot

◆ printPositionAndValue()

void AWindow3D::printPositionAndValue ( )

◆ processRenderingOrder()

std::list<anatomist::AObject *>::iterator AWindow3D::processRenderingOrder ( std::list< anatomist::AObject * > &  opaque) const

calculates the objects rendering order, according to various constraints (opaque/transparent, order at register time, before/after constraints).

Returns
the iterator on the first transparent object (or end if none is)

◆ Refresh

virtual void AWindow3D::Refresh ( )
virtualslot

◆ refreshed

void AWindow3D::refreshed ( )
signal

◆ refreshLightView

void AWindow3D::refreshLightView ( )
slot

Only redraws existing objects (in most cases, just calls existing OpenGL lists, except for observer-dependent objects)

◆ refreshLightViewNow

void AWindow3D::refreshLightViewNow ( )
slot

◆ refreshNow

virtual void AWindow3D::refreshNow ( )
virtualslot

Refresh the window (redraw the contained objects).

◆ refreshTemp

void AWindow3D::refreshTemp ( )
slot

Redraws temporary objects only.

◆ refreshTempNow

void AWindow3D::refreshTempNow ( )
slot

◆ registerObject()

virtual void AWindow3D::registerObject ( anatomist::AObject obj,
bool  temporaryObject = false,
int  position = -1 
)
virtual

Reimplemented from ControlledWindow.

◆ registerObjectModifier()

void AWindow3D::registerObjectModifier ( ObjectModifier mod)
protected

Allows changing display lists from normal objects DLists.

◆ removeFromAutoFusion2D()

void AWindow3D::removeFromAutoFusion2D ( anatomist::AObject obj)
protected

delete or modify the auto Fusion2D object when removing an object

◆ renderAfter()

void AWindow3D::renderAfter ( anatomist::AObject obj,
anatomist::AObject afterthis 
)

adds a rendering order constraint: obj will be rendered immediately after afterthis.

If afterthis is null, then constraints for obj are cleared.

◆ renderBefore()

void AWindow3D::renderBefore ( anatomist::AObject obj,
anatomist::AObject beforethis 
)

adds a rendering order constraint: obj will be rendered immediately before beforethis.

If beforethis is null, then constraints for obj are cleared.

◆ renderingMode()

RenderingMode AWindow3D::renderingMode ( ) const

◆ renderSelectionBuffer()

void AWindow3D::renderSelectionBuffer ( anatomist::ViewState::glSelectRenderMode  mode,
const anatomist::AObject selectedobject = 0 
)

◆ resizeEvent

void AWindow3D::resizeEvent ( QResizeEvent *  )
slot

◆ resizeView [1/2]

void AWindow3D::resizeView ( )
slot

◆ resizeView() [2/2]

void AWindow3D::resizeView ( int  w,
int  h 
)

Tries to resize the viewing area to given size.

◆ rightEyeWindow()

AWindow3D* AWindow3D::rightEyeWindow ( )

◆ saveSnapshot

void AWindow3D::saveSnapshot ( )
protectedslot

◆ saveSnapshotWithCustomSize

void AWindow3D::saveSnapshotWithCustomSize ( )
protectedslot

◆ setActiveConstraintEditor()

void AWindow3D::setActiveConstraintEditor ( bool  b)

◆ setAutoRotationCenter

void AWindow3D::setAutoRotationCenter ( )
slot

◆ setBoundingFrame()

void AWindow3D::setBoundingFrame ( bool  state)

Frame handling methods.

◆ setClipDistance()

void AWindow3D::setClipDistance ( float  d)

◆ setClipMode()

void AWindow3D::setClipMode ( ClipMode  m)

◆ setCulling()

void AWindow3D::setCulling ( bool  )

◆ setFlatShading()

void AWindow3D::setFlatShading ( bool  )

◆ setFog()

void AWindow3D::setFog ( bool  )

◆ setGLWidgetCreator()

static void AWindow3D::setGLWidgetCreator ( GLWidgetCreator  )
static

hook to create inherited QAGLWidgets (Vtk-enabled for instance)

◆ setLeftEyeWindow()

void AWindow3D::setLeftEyeWindow ( AWindow3D )

◆ setLight()

void AWindow3D::setLight ( const anatomist::Light light)

◆ setLinkedCursorOnSliderChange()

void AWindow3D::setLinkedCursorOnSliderChange ( bool  x)

◆ setLinkedCursorPos

void AWindow3D::setLinkedCursorPos ( )
slot

◆ setOrientationCube()

void AWindow3D::setOrientationCube ( bool  state)

Compass handling methods.

◆ setPolygonsSortingDirection()

void AWindow3D::setPolygonsSortingDirection ( bool  dir)

◆ setPolygonsSortingEnabled()

void AWindow3D::setPolygonsSortingEnabled ( bool  )

◆ setPosition() [1/2]

virtual void AWindow3D::setPosition ( const Point3df position,
const anatomist::Referential refdep 
)
virtual

Set position of cursor.

Reimplemented from anatomist::AWindow.

◆ setPosition() [2/2]

virtual void AWindow3D::setPosition ( const std::vector< float > &  position,
const anatomist::Referential orgref 
)
virtual

Reimplemented from anatomist::AWindow.

◆ setReferential()

virtual void AWindow3D::setReferential ( anatomist::Referential ref)
virtual

Reimplemented from anatomist::AWindow.

◆ setRenderingMode()

void AWindow3D::setRenderingMode ( RenderingMode  mode)

Rendering mode (normal, wireframe, fast)

◆ setRightEyeWindow()

void AWindow3D::setRightEyeWindow ( AWindow3D )

◆ setSliceOrientation()

void AWindow3D::setSliceOrientation ( const Point3df normal)

◆ setSliceQuaternion()

void AWindow3D::setSliceQuaternion ( const aims::Quaternion q)

◆ setSliceSliderPosition

void AWindow3D::setSliceSliderPosition ( int  position)
slot

◆ setSmoothing()

void AWindow3D::setSmoothing ( bool  )

◆ setTimeSliderPosition

void AWindow3D::setTimeSliderPosition ( int  position)
slot

◆ setupSliceSlider() [1/2]

void AWindow3D::setupSliceSlider ( )
protected

◆ setupSliceSlider() [2/2]

void AWindow3D::setupSliceSlider ( float  mins,
float  maxs 
)
protected

◆ setupTimeSlider()

void AWindow3D::setupTimeSlider ( const std::vector< float > &  bmin,
const std::vector< float > &  bmax 
)
protected

◆ setupWindowGeometry()

static anatomist::Geometry AWindow3D::setupWindowGeometry ( const std::list< carto::shared_ptr< anatomist::AObject > > &  objects,
const aims::Quaternion slicequat,
const anatomist::Referential wref = 0,
QGLWidget *  glw = 0,
bool  with3d = false 
)
static

◆ setViewPoint()

void AWindow3D::setViewPoint ( float *  quaternion,
const float  zoom 
)

set the view of the scene

◆ setViewType()

virtual void AWindow3D::setViewType ( ViewType  t)
virtual

Mute into a new view type (Axial, Sagittal, Coronal or Oblique)

◆ setVisibleSurfpaint()

void AWindow3D::setVisibleSurfpaint ( bool  b)

◆ showReferential()

void AWindow3D::showReferential ( )
protectedvirtual

Reimplemented from anatomist::AWindow.

◆ showStatusBar()

virtual void AWindow3D::showStatusBar ( int  state = 2)
virtual

◆ showToolBars()

virtual void AWindow3D::showToolBars ( int  state = 2)
virtual

Shows or hides all tools (menu, toolbars) around the main view area.

0: hide, 1: show, 2: toggle

Reimplemented from QAWindow.

◆ sliceQuaternion()

const aims::Quaternion& AWindow3D::sliceQuaternion ( ) const

◆ sliderChanged

void AWindow3D::sliderChanged ( int  dim,
int  slice 
)
signal

◆ smoothing()

bool AWindow3D::smoothing ( ) const

◆ snapshotImage

QImage AWindow3D::snapshotImage ( int  width = 0,
int  height = 0,
int  bufmode = 0 
)
slot

Get a snapshot of the window, after a refresh if needed.

mode: 0: RGB, 2: alpha, 4: RGBA, 8: depth, 16: luminance

◆ sortPolygons()

virtual void AWindow3D::sortPolygons ( bool  force = false)
virtual

◆ subtype()

virtual SubType AWindow3D::subtype ( ) const
virtual

Reimplemented from anatomist::AWindow.

◆ surfpaintIsVisible()

bool AWindow3D::surfpaintIsVisible ( )

◆ switchToolbox

void AWindow3D::switchToolbox ( )
slot

◆ syncViews

void AWindow3D::syncViews ( bool  keepextrema = false)
slot

◆ toggleStatusBarVisibility

void AWindow3D::toggleStatusBarVisibility ( )
slot

◆ tools

void AWindow3D::tools ( )
slot

◆ toolsWinDestroyed

void AWindow3D::toolsWinDestroyed ( )
slot

◆ toopTipsEnabled

bool AWindow3D::toopTipsEnabled ( ) const
slot

◆ transparentZEnabled()

bool AWindow3D::transparentZEnabled ( ) const

◆ type()

virtual Type AWindow3D::type ( ) const
virtual

Get the window type (2D, 3D or control)

Implements anatomist::AWindow.

◆ typeCount() [1/2]

virtual std::set<unsigned>& AWindow3D::typeCount ( )
virtual

Reimplemented from anatomist::AWindow.

◆ typeCount() [2/2]

virtual const std::set<unsigned>& AWindow3D::typeCount ( ) const
virtual

Reimplemented from anatomist::AWindow.

◆ unregisterObject()

virtual void AWindow3D::unregisterObject ( anatomist::AObject obj)
virtual

Reimplemented from ControlledWindow.

Reimplemented in anatomist::RefWindow.

◆ unregisterObjectModifier()

void AWindow3D::unregisterObjectModifier ( ObjectModifier mod)
protected

◆ update()

virtual void AWindow3D::update ( const Observable obs,
void *   
)
virtual

◆ updateLeftRightAnnotations()

void AWindow3D::updateLeftRightAnnotations ( )
protected

◆ updateObject()

void AWindow3D::updateObject ( anatomist::AObject obj,
anatomist::PrimList pl = 0,
anatomist::ViewState::glSelectRenderMode  selectmode = anatomist::ViewState::glSELECTRENDER_NONE 
)
protected

◆ updateObject2D()

void AWindow3D::updateObject2D ( anatomist::AObject obj,
anatomist::PrimList pl = 0,
anatomist::ViewState::glSelectRenderMode  selectmode = anatomist::ViewState::glSELECTRENDER_NONE 
)
protected

◆ updateObject3D()

void AWindow3D::updateObject3D ( anatomist::AObject obj,
anatomist::PrimList pl = 0,
anatomist::ViewState::glSelectRenderMode  selectmode = anatomist::ViewState::glSELECTRENDER_NONE 
)
protected

◆ updateSliceSlider()

int AWindow3D::updateSliceSlider ( )
protected

◆ updateTimeSliders()

void AWindow3D::updateTimeSliders ( )
protected

◆ updateViewTypeToolBar()

void AWindow3D::updateViewTypeToolBar ( )
protected

◆ updateWindowGeometry()

virtual void AWindow3D::updateWindowGeometry ( )
virtual

adapts geometry to the current contents and referential

Reimplemented from anatomist::AWindow.

◆ view() [1/2]

virtual anatomist::View* AWindow3D::view ( )
virtual

Implements ControlledWindow.

◆ view() [2/2]

virtual const anatomist::View* AWindow3D::view ( ) const
virtual

Implements ControlledWindow.

◆ viewState

virtual carto::rc_ptr<anatomist::ViewState> AWindow3D::viewState ( )
virtualslot

◆ viewType()

ViewType AWindow3D::viewType ( ) const

Friends And Related Function Documentation

◆ anatomist::internal::AGraphicsView

Definition at line 357 of file window3D.h.

Member Data Documentation

◆ _baseTitle

std::string AWindow3D::_baseTitle
staticprotected

Definition at line 403 of file window3D.h.

◆ _count3d

std::set<unsigned> AWindow3D::_count3d
staticprotected

3D windows static counter

Definition at line 402 of file window3D.h.


The documentation for this class was generated from the following file: