File: TrackingVolumeViewerQuadrantViews.cxx

package info (click to toggle)
igstk 4.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 36,940 kB
  • ctags: 6,895
  • sloc: cpp: 70,958; makefile: 99; xml: 70
file content (97 lines) | stat: -rw-r--r-- 2,866 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: TrackingVolumeViewerQuadrantViews.cxx,v $
  Language:  C++
  Date:      $Date: 2009-01-30 20:48:03 $
  Version:   $Revision: 1.1 $

  Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

// generated by Fast Light User Interface Designer (fluid) version 1.0107

#include "TrackingVolumeViewerQuadrantViews.h"

namespace igstk
{

TrackingVolumeViewerQuadrantViews::TrackingVolumeViewerQuadrantViews(int X, int Y, int W, int H, const char *L)
  : Fl_Group(X, Y, W, H, L)
{

  m_Reporter = ::itk::Object::New();
 
  const int C = 5;    // Width of the vertical separator

  Fl_Group * parentGroup = this->parent();

  m_X = 150; // width of the control panel
  m_Y = 0;

  m_Width = parentGroup->w() - m_X;
  m_Height = parentGroup->h(); 

  m_WW = (int) (m_Width-2*C)/2;
  m_HH = (int) (m_Height-2*C)/2;

  // Create widgets
  typedef igstk::FLTKWidget   WidgetType;

  m_AxialWidget    = new WidgetType(X, Y, m_WW, m_HH, "Display 0");
  m_SagittalWidget = new WidgetType(X+m_WW+C, Y, m_WW, m_HH, "Display 1");
  m_CoronalWidget  = new WidgetType(X, Y+m_HH+C, m_WW, m_HH, "Display 2");
  m_3DWidget       = new WidgetType(X+m_WW+C, Y+m_HH+C, m_WW, m_HH, "Display 3");       
 
  // Create views
  m_AxialView    = ViewType2D::New();
  m_AxialView->RequestSetOrientation( View2D::Axial );

  m_SagittalView = ViewType2D::New();
  m_SagittalView->RequestSetOrientation( View2D::Sagittal );

  m_CoronalView  = ViewType2D::New();
  m_CoronalView->RequestSetOrientation( View2D::Coronal );

  m_3DView = ViewType3D::New();

  m_AxialWidget->RequestSetView( m_AxialView );
  m_SagittalWidget->RequestSetView( m_SagittalView );
  m_CoronalWidget->RequestSetView( m_CoronalView );
  m_3DWidget->RequestSetView( m_3DView );

  end();
}

TrackingVolumeViewerQuadrantViews::~TrackingVolumeViewerQuadrantViews()
{
  delete m_AxialWidget;
  delete m_SagittalWidget;
  delete m_CoronalWidget;
  delete m_3DWidget;
}

unsigned long TrackingVolumeViewerQuadrantViews::AddObserver(
  const ::itk::EventObject & event, ::itk::Command * observer )
{
  return m_Reporter->AddObserver( event, observer );
}

void TrackingVolumeViewerQuadrantViews::RemoveObserver( unsigned long tag )
{
  m_Reporter->RemoveObserver( tag );
}

void TrackingVolumeViewerQuadrantViews::RemoveAllObservers()
{
  m_Reporter->RemoveAllObservers();
}


} // end namespace igstk