r7061: initial property settings
[ctsim.git] / src / tips.cpp
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 **   Name:          tips.cpp
5 **   Purpose:       User tips for CTSim
6 **   Programmer:    Kevin Rosenberg
7 **   Date Started:  February 2001
8 **
9 **  This is part of the CTSim program
10 **  Copyright (C) 1983-2001 Kevin Rosenberg
11 **
12 **  $Id$
13 **
14 **  This program is free software; you can redistribute it and/or modify
15 **  it under the terms of the GNU General Public License (version 2) as
16 **  published by the Free Software Foundation.
17 **
18 **  This program is distributed in the hope that it will be useful,
19 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
20 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 **  GNU General Public License for more details.
22 **
23 **  You should have received a copy of the GNU General Public License
24 **  along with this program; if not, write to the Free Software
25 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 ******************************************************************************/
27
28 #include "wx/wxprec.h"
29
30 #ifndef WX_PRECOMP
31 #include "wx/wx.h"
32 #endif
33
34
35 #include "tips.h"
36
37 #if defined(HAVE_CONFIG_H)
38 #include "config.h"
39 #endif
40
41
42 const char* const CTSimTipProvider::s_aszTips[] = {
43   "You can create a geometric phantom using the \"File - Create Phantom\" menu command.",
44   "You can create a gray-scale, rasterized image of a phantom by using the \"Process - Rasterize\" menu command on a geometric phantom.",
45   "You can simulate the x-ray process by using the \"Process - Projections\" menu command on a geometric phantom.",
46   "You can simulate first, second, and third-fourth-fifth generation CT scanners by using different scanner geometries.",
47   "You can reconstruct an image from the x-ray data by using the \"Reconstruction\" menu on a projection file.",
48   "You can specify different levels of smoothing by using different filters in the \"Reconstruction\" dialog.",
49   "You can select a row and column of an image by left-mouse button clicking on an image.",
50   "You can plot a column or row of an image by using the \"Analyze - Plot\" command.",
51   "You can save your plots to a disk file by using the \"File - Save\" command.",
52   "You can create your own phantoms using a text editor. Please see the manual for the simple file format.",
53   "You can perform 2-dimension Fourier transform of images using the \"Filter\" menu commands.",
54   "You can create an image of a filter by using the \"File - Create Filter\" menu command.",
55   "You can add two images by using the \"Image - Add\" menu command.",
56   "You can display the value of a pixel in an image by right-mouse button clicking on an image.",
57   "You can view a 3-dimensional view of an image using the \"Image - 3D\" menu command.",
58   "You can scale an image to any size using the \"Image - Scale Size\" menu command.",
59   "You can display context-sensitive help by using the \"Help\" button on dialog boxes.",
60   "You can compare two images by using the \"Analyze - Compare Images\" menu command.",
61   "You can display these tips at any time by using the \"Help - Tips\" menu command.",
62   "You can control CTSim's operation using the \"File - Preferences\" menu command.",
63 };
64
65 const size_t CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
66
67
68 CTSimTipProvider::CTSimTipProvider (size_t iCurrentTip)
69 : wxTipProvider (iCurrentTip)
70 {
71   if (iCurrentTip >= s_iNumTips)
72     iCurrentTip = 0;
73
74   m_iCurrentTip = iCurrentTip;
75 }
76
77 wxString
78 CTSimTipProvider::GetTip()
79 {
80   if (m_iCurrentTip >= s_iNumTips)
81     m_iCurrentTip = 0;
82
83   size_t iThisTip = m_iCurrentTip;
84   ++m_iCurrentTip;
85
86   return wxString (s_aszTips[iThisTip]);
87 }
88
89 size_t
90 CTSimTipProvider::GetCurrentTip()
91 {
92   if (m_iCurrentTip >= s_iNumTips)
93     m_iCurrentTip = 0;
94
95   return m_iCurrentTip;
96 }
97