From 065c60e43bbd0649f42fde5351dc073f59b3aa28 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 16 Jan 2001 20:55:29 +0000 Subject: [PATCH] r403: no message --- ChangeLog | 6 +- doc/Makefile.am | 4 +- doc/tex2rtf/bullet.bmp | Bin 0 -> 138 bytes doc/tex2rtf/ctsim.tex | 372 +++++++++++++++++++++++++ doc/tex2rtf/psbox.tex | 520 +++++++++++++++++++++++++++++++++++ doc/tex2rtf/tex2rtf.ini | 8 + doc/tex2rtf/texhelp.sty | 298 ++++++++++++++++++++ libctsim/projections.cpp | 4 +- msvc/ctsim/ctsim.plg | 85 ++++-- msvc/ctsimtext/ctsimtext.dsp | 6 +- src/views.cpp | 6 +- tools/ctsimtext.cpp | 78 +++--- tools/pj2if.cpp | 21 +- 13 files changed, 1326 insertions(+), 82 deletions(-) create mode 100644 doc/tex2rtf/bullet.bmp create mode 100644 doc/tex2rtf/ctsim.tex create mode 100644 doc/tex2rtf/psbox.tex create mode 100644 doc/tex2rtf/tex2rtf.ini create mode 100644 doc/tex2rtf/texhelp.sty diff --git a/ChangeLog b/ChangeLog index 13268cc..45942f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,11 @@ 3.0.0beta1 - Released - * ctsim: Added icons to Frames + * ctsim: Online help added as well as HTML help + * ctsim: Added icons to Frames on Windows versions + + * pjinfo: Fixed bug when doing --dump and not specifing --endview + 3.0.0alpha5 - Released 1/12/00 * ctsim: Added EZPlotDialog, used by debugging plots in diff --git a/doc/Makefile.am b/doc/Makefile.am index 29d4c6b..400b09b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ -docs=sgp.doc ctsim.tex texhelp.sty +docs=sgp.doc ctsim.tex texhelp.sty tex2rtf/ctsim.tex info_INFO=ctsim.texi -EXTRA_DIST = ${docs} $(info_INFO) +EXTRA_DIST = ${docs} $(info_INFO) dvi: ctsim.tex latex ctsim.tex diff --git a/doc/tex2rtf/bullet.bmp b/doc/tex2rtf/bullet.bmp new file mode 100644 index 0000000000000000000000000000000000000000..aad8fc793edd54ffb5910e67b2470659c95448b7 GIT binary patch literal 138 zcmZumxe>rH2vhFtK1GJ`9PYi2Yw9con_&SdBlI1b>qTKR2Gu`ZXgNITWj7;KP=JJL V1)UXU1`*-lNw`O&c<~DR!2u5s7-j$f literal 0 HcmV?d00001 diff --git a/doc/tex2rtf/ctsim.tex b/doc/tex2rtf/ctsim.tex new file mode 100644 index 0000000..9fd2aec --- /dev/null +++ b/doc/tex2rtf/ctsim.tex @@ -0,0 +1,372 @@ +\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}% +%\input{psbox.tex} + +\newcommand{\ctsim}{{\it CTSim}} +\newcommand{\ctsimtext}{{\it CTSimText}} + +\newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}% +\newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}% +\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}% +\newcommand{\indexit}[1]{#1\index{#1}}% +\newcommand{\inioption}[1]{{\bf {\tt #1}}\index{#1}}% +\parskip=10pt% +\parindent=0pt% +%\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only +\winhelpignore{\title{Manual for CTSim 3.0}% +\author{Kevin Rosenberg, M.D.}% +\date{January 2001}% +}% +\winhelponly{\title{Manual for CTSim 3.0}% +\author{by Julian Smart\\$$\image{1cm;0cm}{tex2rtf.wmf}$$}% +}% +\makeindex% +\begin{document}% +\maketitle% +\pagestyle{fancyplain}% +\bibliographystyle{plain}% +\pagenumbering{roman}% +\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% +\tableofcontents% + +\chapter*{Copyright notice}% +\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% + +Copyright (c) 1983-2001 Kevin Rosenberg, M.D. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose is hereby granted without fee, provided that the +above copyright notice, author statement and this permission notice appear in +all copies of this software and related documentation. + +THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, +IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT SHALL KEVIN ROSENBERG BE LIABLE FOR ANY +SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY +OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +\chapter{Introduction}% +\pagenumbering{arabic}% +\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% + +Computed Tomography is a technique for estimating the interior of an object +from measurement of radiation collected around the object. This radiation +can be either projected through or emitted from the object. +\ctsim simulates the process of projecting X-rays through a phantom object. +\ctsim can then reconstruct the interior of the object from the projections +collected around the phantom object. + +\chapter{Installation}\index{Installation}% +\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% + +\section{Download}%\index{Installation,Download}% + +The latest version of CTSim, plus source code, can be accessed from: + +\begin{verbatim} +http://www.ctsim.org +ftp://ftp.ctsim.org +\end{verbatim} + +It is available in Windows 95/NT/2000 and Linux GUI versions and non-GUI versions. + +\section{Installing Linux RPM}\index{Installation,Linux}% + +\section{Installing Windows Binary}\index{Installation,Windows}% + +\section{Build From Sources}%\index{Installation,Build}% + +See the INSTALL file included in the source distribution for instructions. + +\section{Requirements}\index{Installation,Build,Requirements}% + \item Building CTSim + \begin{itemize}\itemsep=0pt + \item zlib Library (optional) + \par Used for PNG file export. + + \item libpng Library (optional) + \par Used for PNG file export. + \par www.libpng.org + + \item FFTW library (optional) + \par Used for frequency-based filtering and fourier transformations of images. + \par www.fftw.org + + \item readline library (optional) + /par Used for {/ctsimtext} interactive shell. + + \item dmalloc library (optional) + \par Used for debugging memory allocation + \par www.dmalloc.com + + \item wxWindows library (optional) \par Used for + platform-independent graphical interface. The graphical-shell + program \ctsim requires this library. \par www.wxwindows.org + + \end{itemize} +\end{itemize} + +\chapter{ctsim - the Graphical User Interface}%\index{ctsim}% +\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% + +\ctsim\ is the graphical shell for the CTSim project. It is +written using the wxLibrary for cross-platform compatibility with GTK, +Motif, and Microsoft Windows. It includes all of the functionality of +the command-line tool {\tt ctsimtext} as well as image processing and visualization features. + +\section{Usage} +ctsim [OPTIONS] [files to open...] + +\ctsim can open projection files, image files, phantom definition files, and plotfiles. + +\chapter{ctsimtext - The Command Line Interface}\index{ctsimtext}% +\ctsimtext is a master shell for all of the command-line utilities. +\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% + +\section{Usage}% + +\ctsimtext can be executed without any parameters. In that case, \ctsimtext +offers a command-line to enter the function-names and their parameters. The output of the command is displayed. Further commands may be given to \ctsimtext. The shell is exited by the {\tt quit} command. + +\ctsimtext can also be called to execute a single command. This is especially useful for batch files containing multiple \ctsimtext commands. This is invoked by calling {\tt ctsimtext function-name parameters...}. + +The following function names are available: + +\subsection{if1}\index{Programs,ctsimtext,if1}% +Perfoms math functions on a single image. + +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt + \item --invert + \item --log + \item --exp + \item --sqr + \item --sqrt +\end{itemize} + +\subsection{if2}\index{Programs,ctsimtext,if2}% +Perfoms math functions on a two images. + +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt + \item --add + \item --sub + \item --mul + \item --comp + \item --column-plot + \item --row-plot +\end{itemize} + +\subsection{ifinfo}\index{Programs,ctsimtext,ifinfo}% + +Displays information about an imagefile. +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt + \item --labels + \item --no-labels + \item --stats + \item --no-stats + \item --help +\end{itemize} + +\subsection{ifexport}\index{Programs,ctsimtext,ifexport}% +Export an imagefile to a standard graphics file. + +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt + \item --format + \begin{itemize}\itemsep=0pt + \item --pgm + \item --pgmasc + \item --png + \item --png16 + \end{itemize} + \item --center + \begin{itemize}\itemsep=0pt + \item median + \item mode + \item mean + \end{itemize} + \item --auto + \begin{itemize}\itemsep=0pt + \item --full + \item --std0.1 + \item --std0.5 + \item --std1 + \item --std2 + \item --std3 + \end{itemize} + \item --scale + \item --min + \item --max +\end{itemize} + +\subsection{phm2pj}\index{Programs,ctsimtext,phm2pj}% +Simulates collection of X-rays data (projections) around a phantom object. + +\subsubsection{Usage}% +phm2pj projection-file-name number-of-detectors number-of-views [options...] +\begin{itemize}\itemsep=0pt + \item --phantom + Select a standard phantom + \begin{itemize}\itemsep=0pt + \item herman + \item herman-b + \item shepp-logan + \item shepp-logan-b + \end{itemize} + + \item --phmfile + Load a phantom definition definition + + \item --geometry + \begin{itemize}\itemsep=0pt + \item parallel + \item equiangular + \item equilinear + \end{itemize} + + \item --nray + Number of samples per each detector + + \item --rotangle + Sets the rotation amount as a multiple of pi. For parallel geometries use +a rotation angle of 1 and for equilinear and equiangular geometries use a rotation angle of 2. + + \item --field-of-view + Sets the field of view as a ratio of the diameter of the phantom. For parallel geometries, using a value of 1.0 is fine. For other geometies, this should be at least 1.3 to avoid artifacts. + + \item --focal-length + Sets the distance of the radiation source and detectors from the center of the object as a ratio of the radius of the object. For parallel geometries, a value of 1.0 is fine. For other geometries, this should be at least 2.0 to avoid artifacts. +\end{itemize} + +\subsection{phm2if}\index{Programs,ctsimtext,phm2if}% +Converts a geometric phantom object into an imagefile. The size of the +imagefile in pixels must be specified as well as the number of samples +to average per pixel. + +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt + \item --nsamples +\end{itemize} + +\subsection{pj2if}\index{Programs,ctsimtext,pj2if}% +Convert a projection file into an imagefile. + +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt +\end{itemize} + +\subsection{pjinfo}\index{Programs,ctsimtext,pjinfo}% +Displays information about a projection file. + +\subsubsection{Usage}% +\begin{itemize}\itemsep=0pt + \item --binaryheader + \item --binaryview + \item --startview + \item --endview + \item --dump +\end{itemize} + +\subsection{pjrec}\index{Programs,ctsimtext,pjrec}% +Reconstructs the interior of an object from a projection file. + +\subsubsection{Usage}% + +\subsubsection{Parameters}% +\begin{itemize}\itemsep=0pt + \item Filter + Selects which filter to apply to each projection. To + properly reconstruct an image, this filter should be multiplied + by the absolute value of distance from zero frequency. + \begin{itemize}\itemsep=0pt + \item abs_bandlimit + \item abs_cosine + \item abs_hamming + \item abs_sinc + \end{itemize} + + \item Filter Parameter + \par Sets the alpha level for Hamming + window. At setting of 0.54, this equals the Hanning window. + + \item Filter Method + \begin{itemize}\itemsep=0pt + \item convolution + \item fourier + \item fourier_table + \item fftw + \item rfftw + \end{itemize} + + \item Filter Generation + \begin{itemize}\itemsep=0pt + \item direct + \item inverse_fourier + \end{itemize} + + \item Interpolation + \begin{itemize}\itemsep=0pt + \item nearest + \item linear + \end{itemize} + + \item Backprojection + \begin{itemize}\itemsep=0pt + \item trig + \item table + \item diff + \item diff2 + \item idiff2 + \item idiff3 + \end{itemize} + + \item Zeropad + \item Preinterpolation Factor +\end{itemize} + +\chapter{The Web Browser CGI Interface}\index{Web Interface}% +\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% + +\section{Overview}\index{Web Interface,Overview}% +The CGI program {\tt ctsim.cgi} takes projections of a standard +phantom object, performs reconstruction, and then compares the +rasterized phantom object with the reconstruction. The comparison is +performed both visually by an image subtraction as well as by standard +statistics as described by Herman\cite{HERMAN80}. + +\section{Requirements}\index{Web Interface,Requirements}% +\begin{itemize}\itemsep=0pt + \item For Web Interface + \begin{itemize}\itemsep=0pt + \item Apache or other CGI compatible web server + + \item Perl (version 4.0 or higher) + + \item A client web browser than can display PNG files. Most + current web browswer do support PNG. + \end{itemize} + + \end{itemize} + +\bibliographystyle{abbrv} +\bibliography{yes} + +\addcontentsline{toc}{chapter}{Index} +\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}% +\setfooter{\thepage}{}{}{}{}{\thepage}% +\printindex% + +\end{document} diff --git a/doc/tex2rtf/psbox.tex b/doc/tex2rtf/psbox.tex new file mode 100644 index 0000000..b7438f4 --- /dev/null +++ b/doc/tex2rtf/psbox.tex @@ -0,0 +1,520 @@ +% +% %%%%%%% %%%%% %%%%%% %%%%% % % +% % % % % % % % % % +% % % % % % % % % % +% %%%%%%% %%%%% %%%%%% % % % +% % % % % % % % % +% % % % % % % % % +% % %%%%%% %%%%%% %%%%% % % +% +% By Jean Orloff +% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch +% No modification of this file allowed if not e-sent to me. +% +% A simple way to measure the size of encapsulated postscript figures +% from inside TeX, and to use it for automatically formatting texts +% with inserted figures. Works both under Plain TeX-based macros +% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment. +% Provides exactly the same result on any PostScript printer provided +% the single instruction \psfor... is changed to fit the needs of the +% particular dvi->ps translator used. +% History: +% 1.31: adds \psforDVIALW(?) +% 1.30: adds \splitfile & \joinfiles for multi-file management +% 1.24: fix error handling & add \psonlyboxes +% 1.23: adds \putsp@ce for OzTeX fix +% 1.22: makes \drawingBox \global for use in Phyzzx +% 1.21: accepts %%BoundingBox: (atend) +% 1.20: tries to add \psfordvitps for the TeXPS package. +% 1.10: adds \psforoztex, error handling... +%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789 +% +\def\temp{1.31} +\let\tempp=\relax +\expandafter\ifx\csname psboxversion\endcsname\relax + \message{version: \temp} +\else + \ifdim\temp cm>\psboxversion cm + \message{version: \temp} + \else + \message{psbox(\psboxversion) is already loaded: I won't load + psbox(\temp)!} + \let\temp=\psboxversion + \let\tempp=\endinput + \fi +\fi +\tempp +\let\psboxversion=\temp +\catcode`\@=11 +% Every macro likes a little privacy... +% +% Some common defs +% +\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution +\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex +\def\executeinspecs#1{% +\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}} +% +%Trying to tame the variety of \special commands for Postscript: the +% universal internal command \PSspeci@l##1##2 takes ##1 to be the +% filename and ##2 to be the integer scale factor*1000 (as for usual +% TeX \scale commands) +% +\def\psfortextures{% For TeXtures on the Macintosh +%----------------- +\def\PSspeci@l##1##2{% +\special{illustration ##1\space scaled ##2}% +}} +% +\def\psfordvitops{% For the DVItoPS converter on IBM mainframes +%---------------- +\def\PSspeci@l##1##2{% +\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}% +}} +% +\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's +%-------------- +\def\PSspeci@l##1##2{% +% \special{/@scaleunit 1000 def}% never read dox without trying! +\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my% +\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space% +urx=\psurx\space ury=\psury\space rwi=\number\d@mx}% +}} +% +\def\psforoztex{% For the OzTeX shareware on the Macintosh +%-------------- +\def\PSspeci@l##1##2{% +\special{##1 \space + ##2 1000 div dup scale + \putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate +}% +}} +\def\putsp@ce#1{#1 } +% +\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12 +%--------------- +% Convert a dimension into the number \psn@sp (in scaled points) +\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}} +\def\PSspeci@l##1##2{% +% psfig.psr contains the def of "startTexFig": if you can locate it +% and include the correct pathname, it should work +\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig" +\psdimt@n@sp{\drawingwd} +\special{dvitps: Literal "\psn@sp\space"} +\psdimt@n@sp{\drawinght} +\special{dvitps: Literal "\psn@sp\space"} +\psdimt@n@sp{\psllx bp} +\special{dvitps: Literal "\psn@sp\space"} +\psdimt@n@sp{\pslly bp} +\special{dvitps: Literal "\psn@sp\space"} +\psdimt@n@sp{\psurx bp} +\special{dvitps: Literal "\psn@sp\space"} +\psdimt@n@sp{\psury bp} +\special{dvitps: Literal "\psn@sp\space startTexFig\space"} +\special{dvitps: Include1 "##1"} +\special{dvitps: Literal "endTexFig\space"} +}} +\def\psforDVIALW{% Try for dvialw, a UNIX public domain +%--------------- +\def\PSspeci@l##1##2{ +\special{language "PS" +literal "##2 1000 div dup scale" +include "##1"}}} +\def\psonlyboxes{% Draft-like behaviour if none of the others works +%--------------- +\def\PSspeci@l##1##2{% +\at(0cm;0cm){\boxit{\vbox to\drawinght + {\vss + \hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss} + }}} +}% +} +% +\def\psloc@lerr#1{% +\let\savedPSspeci@l=\PSspeci@l% +\def\PSspeci@l##1##2{% +\at(0cm;0cm){\boxit{\vbox to\drawinght + {\vss + \hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss} + }}} +\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs! +}% +} +% +%\def\psfor... add your own! +% +% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing +% and stores it in \drawinght(wd) +\newread\pst@mpin +\newdimen\drawinght\newdimen\drawingwd +\newdimen\psxoffset\newdimen\psyoffset +\newbox\drawingBox +\newif\ifNotB@undingBox +\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of +your graphics (Jean Orloff).} +\def\@mpty{} +\def\s@tsize#1 #2 #3 #4\@ndsize{ + \def\psllx{#1}\def\pslly{#2}% + \def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips! + \ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one! + \else + \drawinght=#4bp\advance\drawinght by-#2bp + \drawingwd=#3bp\advance\drawingwd by-#1bp +% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED! + \fi + } +\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}} +\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2} +\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex +\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution +{\catcode`\%=12 +\xdef\B@undingBox{%%BoundingBox} +} %% is not a true comment in PostScript, even if % is! +\def\ReadPSize#1{ + \edef\PSfilename{#1} + \openin\pst@mpin=#1\relax + \ifeof\pst@mpin \errhelp=\PShelp + \errmessage{I haven't found your postscript file (\PSfilename)} + \psloc@lerr{was not found} + \s@tsize 0 0 142 142\@ndsize + \closein\pst@mpin + \else + \immediate\write\psbj@inaux{#1,} + \loop + \executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline} + \ifeof\pst@mpin + \errhelp=\PShelp + \errmessage{(\PSfilename) is not an Encapsulated PostScript File: + I could not find any \B@undingBox: line.} + \edef\v@lue{0 0 142 142:} + \psloc@lerr{is not an EPSFile} + \NotB@undingBoxfalse + \else + \expandafter\sc@nline\n@xtline:\@ndline + \ifx\p@rameter\B@undingBox\NotB@undingBoxfalse + \edef\t@mp{% + \expandafter\g@bblefirstblank\v@lue\space\space\space} + \expandafter\s@tsize\t@mp\@ndsize + \else\NotB@undingBoxtrue + \fi + \fi + \ifNotB@undingBox\repeat + \closein\pst@mpin + \fi +\message{#1} +} +% +% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and +% TeX uniformly scales to fit the largest one. If xdim=0pt, the +% scale is fully determined by ydim and vice versa. +% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all +% indentation and all cr's would be interpreted as spaces (hugh!). +% +\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm +\newdimen\d@mx \newdimen\d@my +\let\ps@nnotation=\relax +\def\psboxto(#1;#2)#3{\vbox{ + \ReadPSize{#3} + \divide\drawingwd by 1000 + \divide\drawinght by 1000 + \d@mx=#1 + \ifdim\d@mx=0pt\xscale=1000 + \else \xscale=\d@mx \divide \xscale by \drawingwd\fi + \d@my=#2 + \ifdim\d@my=0pt\yscale=1000 + \else \yscale=\d@my \divide \yscale by \drawinght\fi + \ifnum\yscale=1000 + \else\ifnum\xscale=1000\xscale=\yscale + \else\ifnum\yscale<\xscale\xscale=\yscale\fi + \fi + \fi + \divide \psxoffset by 1000\multiply\psxoffset by \xscale + \divide \psyoffset by 1000\multiply\psyoffset by \xscale + \global\divide\pscm by 1000 + \global\multiply\pscm by\xscale + \multiply\drawingwd by\xscale \multiply\drawinght by\xscale + \ifdim\d@mx=0pt\d@mx=\drawingwd\fi + \ifdim\d@my=0pt\d@my=\drawinght\fi + \message{scaled \the\xscale} + \hbox to\d@mx{\hss\vbox to\d@my{\vss + \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{ + \kern-\psyoffset + \PSspeci@l{\PSfilename}{\the\xscale} + \vss}\hss\ps@nnotation} + \global\ht\drawingBox=\the\drawinght + \global\wd\drawingBox=\the\drawingwd + \baselineskip=0pt + \copy\drawingBox + \vss}\hss} + \global\psxoffset=0pt + \global\psyoffset=0pt% These are local to one figure + \global\pscm=1cm + \global\drawingwd=\drawingwd + \global\drawinght=\drawinght +}} +% +% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the +% rounding errors of TeX integer divisions for situations where the +% TeX box should fit the original BoundingBox with a precision better +% than 1/1000. +% +\def\psboxscaled#1#2{\vbox{ + \ReadPSize{#2} + \xscale=#1 + \message{scaled \the\xscale} + \divide\drawingwd by 1000\multiply\drawingwd by\xscale + \divide\drawinght by 1000\multiply\drawinght by\xscale + \divide \psxoffset by 1000\multiply\psxoffset by \xscale + \divide \psyoffset by 1000\multiply\psyoffset by \xscale + \global\divide\pscm by 1000 + \global\multiply\pscm by\xscale + \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{ + \kern-\psyoffset + \PSspeci@l{\PSfilename}{\the\xscale} + \vss}\hss\ps@nnotation} + \global\ht\drawingBox=\the\drawinght + \global\wd\drawingBox=\the\drawingwd + \baselineskip=0pt + \copy\drawingBox + \global\psxoffset=0pt + \global\psyoffset=0pt% These are local to one figure + \global\pscm=1cm + \global\drawingwd=\drawingwd + \global\drawinght=\drawinght +}} +% +% \psbox{PSfilename} makes a TeX box having the minimal size to +% enclose the picture +\def\psbox#1{\psboxscaled{1000}{#1}} +% +% +% \joinfiles file1, file2, ...n \into joinedfilename . +% makes one file out of many +% \splitfile joinedfilename +% the opposite +% +%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution +%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex +%\def\executeinspecs#1{% +%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}} +%\newread\pst@mpin +\newif\ifn@teof\n@teoftrue +\newif\ifc@ntrolline +\newif\ifmatch +\newread\j@insplitin +\newwrite\j@insplitout +\newwrite\psbj@inaux +\immediate\openout\psbj@inaux=psbjoin.aux +\immediate\write\psbj@inaux{\string\joinfiles} +\immediate\write\psbj@inaux{\jobname,} +% +% We redefine input to keep track of the various files inputted +% +\immediate\let\oldinput=\input +\def\input#1 { + \immediate\write\psbj@inaux{#1,} + \oldinput #1 } +\def\empty{} +\def\setmatchif#1\contains#2{ + \def\match##1#2##2\endmatch{ + \def\tmp{##2} + \ifx\empty\tmp + \matchfalse + \else + \matchtrue + \fi} + \match#1#2\endmatch} +\def\warnopenout#1#2{ + \setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2} + \ifmatch + \else + \immediate\openin\pst@mpin=#2 + \ifeof\pst@mpin + \else + \errhelp{If the content of this file is so precious to you, abort (ie +press x or e) and rename it before retrying.} + \errmessage{I'm just about to replace your file named #2} + \fi + \immediate\closein\pst@mpin + \fi + \message{#2} + \immediate\openout#1=#2} +% No comments allowed below: % will have an unusual catcode +{ +\catcode`\%=12 +\gdef\splitfile#1 { + \immediate\openin\j@insplitin=#1 + \message{Splitting file #1 into:} + \warnopenout\j@insplitout{TrashMe} + \loop + \ifeof + \j@insplitin\immediate\closein\j@insplitin\n@teoffalse + \else + \n@teoftrue + \executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter + \ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck} + \ifc@ntrolline + \else + \toks0=\expandafter{\spl@tinline} + \immediate\write\j@insplitout{\the\toks0} + \fi + \fi + \ifn@teof\repeat + \immediate\closeout\j@insplitout} +\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{ + \def\t@mp{#1} + \ifx\empty\t@mp + \def\t@mp{#3} + \ifx\empty\t@mp + \global\c@ntrollinefalse + \else + \immediate\closeout\j@insplitout + \warnopenout\j@insplitout{#2} + \global\c@ntrollinetrue + \fi + \else + \global\c@ntrollinefalse + \fi} +\gdef\joinfiles#1\into#2 { + \message{Joining following files into} + \warnopenout\j@insplitout{#2} + \message{:} + { + \edef\w@##1{\immediate\write\j@insplitout{##1}} + \w@{% This text was produced with psbox's \string\joinfiles.} + \w@{% To decompose and tex it:} + \w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions} + \w@{% (say, JOINTFIL), in some uncrowded directory;} + \w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);} + \w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by} + \w@{% the first part in the joining (after splitting JOINTFIL into} + \w@{% it's constituents, TeX will try to process it as it stands).} + \w@{\string\input\space psbox.tex} + \w@{\string\splitfile{\string\jobname}} + } + \tre@tfilelist#1, \endtre@t + \immediate\closeout\j@insplitout} +\gdef\tre@tfilelist#1, #2\endtre@t{ + \def\t@mp{#1} + \ifx\empty\t@mp + \else + \llj@in{#1} + \tre@tfilelist#2, \endtre@t + \fi} +\gdef\llj@in#1{ + \immediate\openin\j@insplitin=#1 + \ifeof\j@insplitin + \errmessage{I couldn't find file #1.} + \else + \message{#1} + \toks0={%Beginning-Of-File-Named:#1} + \immediate\write\j@insplitout{\the\toks0} + \executeinspecs{\global\read\j@insplitin to\oldj@ininline} + \loop + \ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse + \else\n@teoftrue + \executeinspecs{\global\read\j@insplitin to\j@ininline} + \toks0=\expandafter{\oldj@ininline} + \let\oldj@ininline=\j@ininline + \immediate\write\j@insplitout{\the\toks0} + \fi + \ifn@teof + \repeat + \immediate\closein\j@insplitin + \fi} +} +% To be put at the end of a file, for making an tar-like file containing +% everything it used. +\def\autojoin{ + \immediate\write\psbj@inaux{\string\into\space psbjoin.all} + \immediate\closeout\psbj@inaux + \input psbjoin.aux +} +% +% Annotations & Captions etc... +% +% +% \centinsert{anybox} is just a centered \midinsert, but is included as +% people barely use the original inserts from TeX. +% +\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert} +\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1} +\def\pscaption#1#2{\vbox{ + \setbox\drawingBox=#1 + \copy\drawingBox + \vskip\baselineskip + \vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2} + \ifdim\wd0>\hsize + \noindent\unhbox0\tolerance=5000 + \else\centerline{\box0} + \fi +}}} +% for compatibility with older versions +\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}} +\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}} +% +% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current +% position without moving it (to be used in annotations). +\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt + \rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}} +% +% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left +% corner is the current point +\newdimen\gridht \newdimen\gridwd +\def\gridfill(#1;#2){ + \setbox0=\hbox to 1\pscm + {\vrule height1\pscm width.4pt\leaders\hrule\hfill} + \gridht=#1 + \divide\gridht by \ht0 + \multiply\gridht by \ht0 + \gridwd=#2 + \divide\gridwd by \wd0 + \multiply\gridwd by \wd0 + \advance \gridwd by \wd0 + \vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}} +% +% Useful to measure where to put annotations +\def\fillinggrid{\at(0cm;0cm){\vbox{ + \gridfill(\drawinght;\drawingwd)}}} +% +% \textleftof\anybox: Sample text\endtext +% inserts "Sample text" on the left of \anybox ie \vbox, \psbox. +% \textrightof is the symmetric (not documented, too uggly) +% Welcome any suggestion about clean wraparound macros from +% TeXhackers reading this +% +\def\textleftof#1:{ + \setbox1=#1 + \setbox0=\vbox\bgroup + \advance\hsize by -\wd1 \advance\hsize by -2em} +\def\textrightof#1:{ + \setbox0=#1 + \setbox1=\vbox\bgroup + \advance\hsize by -\wd0 \advance\hsize by -2em} +\def\endtext{ + \egroup + \hbox to \hsize{\valign{\vfil##\vfil\cr% +\box0\cr% +\noalign{\hss}\box1\cr}}} +% +% \frameit{\thick}{\skip}{\anybox} +% draws with thickness \thick a box around \anybox, leaving \skip of +% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}} +% \boxit{\anybox} is a shortcut. +\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{ + \hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}% + \vskip#2\hrule height#1}\vrule width#1}} +\def\boxit#1{\frameit{0.4pt}{0pt}{#1}} +% +% +\catcode`\@=12 % cs containing @ are unreachable +% +% CUSTOMIZE YOUR DEFAULT DRIVER: +% Uncomment the line corresponding to your TeX system: +%\psfortextures% For TeXtures on the Macintosh +%\psforoztex % For OzTeX shareware on the Macintosh +%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes + \psfordvips % For DVIPS converter on VAX and UNIX +%\psfordvitps % For dvitps from TeXPS package under UNIX +%\psforDVIALW % For DVIALW, UNIX public domain +%\psonlyboxes % Blank Boxes (when all else fails). diff --git a/doc/tex2rtf/tex2rtf.ini b/doc/tex2rtf/tex2rtf.ini new file mode 100644 index 0000000..579f93c --- /dev/null +++ b/doc/tex2rtf/tex2rtf.ini @@ -0,0 +1,8 @@ +winHelpVersion = 4 +winHelpContents = yes +generateHPJ = yes +htmlWorkshopFiles = true +combineSubSections = true +runTwice = yes + + diff --git a/doc/tex2rtf/texhelp.sty b/doc/tex2rtf/texhelp.sty new file mode 100644 index 0000000..af91bd5 --- /dev/null +++ b/doc/tex2rtf/texhelp.sty @@ -0,0 +1,298 @@ +% LaTeX style file +% Name: texhelp.sty +% Author: Julian Smart +% +% Purpose +% ------- +% Style file to enable the simultaneous preparation of printed LaTeX and on-line +% hypertext manuals. +% Use in conjunction with Tex2RTF (see Tex2RTF documentation). +% +% Note that if a non-ASCII character starts a newline and there should be a space +% between the last word on the previous line and the first word on this line, +% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored +% in all other formats. +% +% Julian Smart +% Artificial Intelligence Applications Institute +% +% +% ============== C++/CLIPS Documentation Facilities ============== +% +% Each class definition should be typeset with e.g. +% +% \section{\class{Name}: Parent} +% +% followed by a description of the class. +% Each member should follow: +% +% \membersection{wxName::Member} +% +% with a description of what this member does. +% Then, one (or more if overloaded) member (function) in detail: +% +% \func{return type}{name}{args} +% or +% \member{type}{name} +% +% where args is a list of \param{type}{name}, ... + +% Function, e.g. +% e.g. to typeset +% +% void DoIt(char *string); +% +% write: +% +% \func{void}{DoIt}{\param{char *}{string}} +% + +\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm +{{\it #1} {\bf #2}\index{#2}}(#3)} + +% For function/type definition where the name is a pointer, +% e.g. to typeset +% +% typedef void (*wxFunction)(wxObject&) +% +% write: +% +% \pfunc{typedef void}{wxFunction}{param{wxObject&}} + +\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm +{{\it #1} ({\bf *#2})\index{#2}}(#3)} + +% Use an ordinary \section command for class name definitions. + +% This is used for a member, such as wxBitmap: GetDepth +\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}} + +% CLIPS function +\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm +{{\bf #1} ({\bf #2}\index{#2}}#3)} + +\newcommand{\clipssection}[1]{\chapter{#1}} + +% This is used for a CLIPS function name +\newcommand{\functionsection}[1]{\subsection*{#1}} + +% Member: a type and a name +\newcommand{\member}[2]{{\bf #1 \it #2}} + +% C++ Parameter: a type and a name (no intervening space) +\newcommand{\param}[2]{{\it #1}{\bf #2}} + +% CLIPS Parameter: a type and a name (one intervening space) +\newcommand{\cparam}[2]{{\bf #1} {\it #2}} + +% Class: puts in index +\newcommand{\class}[1]{#1\index{#1}} + +%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}} + +% Void type +\newcommand{\void}{{\it void}} + +% Typeset destructor +\newcommand{\destruct}[1]{{$\sim$}#1} + +% Typeset insert/extract operators +\newcommand{\cinsert}{$<<$} +\newcommand{\cextract}{$>>$} + + +% =================== Hypertext facilities =================== +% +% To insert hyperlinks (or references, in Latex), \label the sections +% or membersections \label{ref-label} immediately after the section, on the same line, +% and use \helpref{text-to-show}{ref-label} to make a reference. +% + +% Type text with section reference +\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) } + +% Type text with URL in verbatim mode +\newcommand{\urlref}[2]{#1 (\verb$#2$)} + +% Don't typeset section number in LaTeX +\newcommand{\helprefn}[2]{{\it #1}} + +% Like helpref, but popup text in WinHelp instead of hyperlinked +\newcommand{\popref}[2]{{\it #1}} + +% Like footnote, but popup text. +\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}} + +% =================== On-line help specific macros =================== +% + +% Global document font size/family, help only. +\newcommand{\helpfontsize}[1]{} +\newcommand{\helpfontfamily}[1]{} + +% Ignore in all on-line help +\newcommand{\helpignore}[1]{#1} +% Only print in all on-line help +\newcommand{\helponly}[1]{} + +% Ignore in LaTeX +\newcommand{\latexignore}[1]{} +% Only print in LaTeX +\newcommand{\latexonly}[1]{#1} + +% Ignore in linear RTF +\newcommand{\rtfignore}[1]{#1} +% Only print in linear RTF +\newcommand{\rtfonly}[1]{} + +% Ignore in WinHelp RTF +\newcommand{\winhelpignore}[1]{#1} +% Only print in WinHelp RTF +\newcommand{\winhelponly}[1]{} + +% Ignore in wxHelp +\newcommand{\xlpignore}[1]{#1} +% Only print in wxHelp +\newcommand{\xlponly}[1]{} + +% Ignore in HTML +\newcommand{\htmlignore}[1]{#1} +% Only print in HTML +\newcommand{\htmlonly}[1]{} + +% Input a file only for help system (binder thickness is not a limitation +% in help systems!) +\newcommand{\helpinput}[1]{} + +\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex + +% =================== Miscellaneous macros =================== +% +% Headings consistent with generated ones +\newcommand{\myheading}[1]{\vspace*{25pt} +\begin{flushleft} +{\LARGE \bf #1} +\end{flushleft} +\vskip 20pt +} + +% Heading with entry in contents page. +\newcommand{\chapterheading}[1]{\myheading{#1} +\addcontentsline{toc}{chapter}{#1}} + +\newcommand{\sectionheading}[1]{\myheading{#1} +\addcontentsline{toc}{section}{#1}} + +% Glossary environment +\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}} + +% Glossary entry +\newcommand{\gloss}[1]{\item[#1]\index{#1}} + +% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox. +\newcommand{\image}[2]{\psboxto(#1){#2}} + +% Image, left aligned (HTML) +\newcommand{\imager}[2]{\psboxto(#1){#2}} + +% Image, right aligned (HTML) +\newcommand{\imagel}[2]{\psboxto(#1){#2}} + +% Imagemap: principally for HTML only. In Latex, +% acts like \image. +\newcommand{\imagemap}[3]{\psboxto(#1){#2}} + +% Headers and footers +% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight} +% {OddPageLeft}{OddPageCentre}{OddPageRight} +\newcommand{\setheader}[6]{ +\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}} +\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}} +\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}} +} + +% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight} +% {OddPageLeft}{OddPageCentre}{OddPageRight} +\newcommand{\setfooter}[6]{ +\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}} +\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}} +\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}} +} + +% Needed for telling RTF where margin paragraph should go +% in mirrored margins mode. +\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}} +\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}} + +% Environment for two-column table popular in WinHelp and manuals. +\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}} +\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}} +\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}} + +\twocolwidtha{3cm} +\twocolwidthb{8.5cm} +\twocolspacing{2} + +\newcommand{\twocolitem}[2]{#1 & #2\\} +\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline} + +\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}% +{\end{tabular}\renewcommand{\arraystretch}{1}} + +% Specifying table rows for RTF compatibility +\newcommand{\row}[1]{#1\\} + +% Use for the last ruled row for correct RTF generation. +\newcommand{\ruledrow}[1]{#1\\\hline} + +% Indentation environment. Arg1 is left margin size +\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}% +{\end{list}} + +% Framed box of text, normal formatting. +\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}} +% Double-framed box of text. +\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}} + +% WITHDRAWN -- can't do in RTF, easily. +% Framed box of text, horizontally centred. Ragged right within box. +% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}} +% Double-framed box of text, horizontally centred. Ragged right within box. +% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}} + +% toocomplex environment: simply prints the argument in LaTeX, +% comes out verbatim in all generated formats. +\newenvironment{toocomplex}{}{} + +% Colour: dummy commands since LaTeX doesn't support colour. +% \definecolour{name}{red}{blue}{green} +% \fcol{name}{text} ; Foreground +% \bcol{name}{text} ; Background +\newcommand{\definecolour}[4]{} +\newcommand{\definecolor}[4]{} +\newcommand{\fcol}[2]{#2} +\newcommand{\bcol}[2]{#2} +\newcommand{\sethotspotcolour}[1]{} +\newcommand{\sethotspotunderline}[1]{} +\newcommand{\settransparency}[1]{} +\newcommand{\backslashraw}[0]{} +\newcommand{\lbraceraw}[0]{} +\newcommand{\rbraceraw}[0]{} +\newcommand{\registered}[0]{(r)} +\newcommand{\background}[1]{} +\newcommand{\textcolour}[1]{} +\newcommand{\overview}[2]{See \helpref{#1}{#2}.} +\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[] +#2% +\end{list}} +\newcommand{\wxheading}[1]{{\bf #1}} +\newcommand{\const}[0]{{\bf const}} +\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} +\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}} + +\addtolength{\textwidth}{1in} +\addtolength{\oddsidemargin}{-0.5in} +\addtolength{\topmargin}{-0.5in} +\addtolength{\textheight}{1in} +\sloppy + diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index b5db204..f5f9c6a 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.44 2001/01/13 22:30:01 kevin Exp $ +** $Id: projections.cpp,v 1.45 2001/01/16 20:55:29 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -637,6 +637,8 @@ Projections::printProjectionData (int startView, int endView) if (m_projData != NULL) { if (startView < 0) startView = 0; + if (endView < 0) + endView = m_nView - 1; if (startView > m_nView - 1) startView = m_nView - 1; if (endView > m_nView - 1) diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index 2810d8a..28caf90 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -3,40 +3,83 @@
 

Build Log

---------------------Configuration: ctsim - Win32 Debug-------------------- +--------------------Configuration: libctsim - Win32 Release--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP45.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA.tmp" with contents [ -/nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\ctsim\src\ctsim.cpp" +/nologo /G6 /MT /W3 /GR /GX /O2 /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\include" /D "NDEBUG" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /Fp"Release/libctsim.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\ctsim\libctsim\projections.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP45.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP46.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB.tmp" with contents [ -comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrtd.lib" /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" -.\Debug\ctsim.obj -.\Debug\dialogs.obj -.\Debug\dlgprojections.obj -.\Debug\dlgreconstruct.obj -.\Debug\docs.obj -.\Debug\views.obj -.\Debug\ctsim.res -\ctsim\msvc\libctsim\Debug\libctsim.lib -"\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib" -"\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib" -\wx2\lib\wxd.lib +/nologo /out:"Release\libctsim.lib" +.\Release\array2dfile.obj +.\Release\backprojectors.obj +.\Release\clip.obj +.\Release\consoleio.obj +.\Release\dlgezplot.obj +.\Release\ezplot.obj +.\Release\ezset.obj +.\Release\ezsupport.obj +.\Release\filter.obj +.\Release\fnetorderstream.obj +.\Release\fourier.obj +.\Release\getopt.obj +.\Release\getopt1.obj +.\Release\globalvars.obj +.\Release\hashtable.obj +.\Release\imagefile.obj +.\Release\mathfuncs.obj +.\Release\phantom.obj +.\Release\plotfile.obj +.\Release\pol.obj +.\Release\procsignal.obj +.\Release\projections.obj +.\Release\reconstruct.obj +.\Release\scanner.obj +.\Release\sgp.obj +.\Release\strfuncs.obj +.\Release\syserror.obj +.\Release\trace.obj +.\Release\transformmatrix.obj +.\Release\xform.obj ] -Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP46.tmp" +Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB.tmp"

Output Window

Compiling... -ctsim.cpp +projections.cpp +Creating library... +

+--------------------Configuration: ctsim - Win32 Release-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPC.tmp" with contents +[ +kernel32.lib user32.lib wsock32.lib comctl32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpng.lib zlib.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/ctsim.pdb" /machine:I386 /out:"Release/ctsim.exe" /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" +.\Release\ctsim.obj +.\Release\dialogs.obj +.\Release\dlgprojections.obj +.\Release\dlgreconstruct.obj +.\Release\docs.obj +.\Release\views.obj +.\Release\ctsim.res +\ctsim\msvc\libctsim\Release\libctsim.lib +"\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib" +"\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib" +\wx2\lib\wx.lib +] +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPC.tmp" +

Output Window

Linking... +LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF +LINK : warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF

Results

-ctsim.exe - 0 error(s), 0 warning(s) +ctsim.exe - 0 error(s), 2 warning(s)
diff --git a/msvc/ctsimtext/ctsimtext.dsp b/msvc/ctsimtext/ctsimtext.dsp index 482c647..f332cf4 100644 --- a/msvc/ctsimtext/ctsimtext.dsp +++ b/msvc/ctsimtext/ctsimtext.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 wx.lib libctsim.lib zlib.lib comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpng.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib /nologo /subsystem:console /machine:I386 /libpath:"..\libctsim\Release" /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\wx2\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" +# ADD LINK32 wx.lib libctsim.lib zlib.lib comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpng.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib /nologo /subsystem:console /machine:I386 /libpath:"..\libctsim\Release" /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\wx2\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" !ELSEIF "$(CFG)" == "ctsimtext - Win32 Debug" @@ -134,6 +134,10 @@ SOURCE=..\..\tools\pjrec.cpp # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\ctsimtext.rc +# End Source File # End Group # End Target # End Project diff --git a/src/views.cpp b/src/views.cpp index 0e5b79f..cade26a 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.62 2001/01/13 10:14:06 kevin Exp $ +** $Id: views.cpp,v 1.63 2001/01/16 20:55:29 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -765,9 +765,9 @@ wxFrame* ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) { #if CTSIM_MDI - wxMDIChildFrame *subframe = new wxMDIChildFrame(theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxMDIChildFrame *subframe = new wxMDIChildFrame (theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); #endif theApp->setIconForFrame (subframe); diff --git a/tools/ctsimtext.cpp b/tools/ctsimtext.cpp index 51f76f3..4c632a3 100644 --- a/tools/ctsimtext.cpp +++ b/tools/ctsimtext.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsimtext.cpp,v 1.14 2001/01/13 05:15:44 kevin Exp $ +** $Id: ctsimtext.cpp,v 1.15 2001/01/16 20:55:29 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -45,7 +45,7 @@ extern "C" { // If linked to ctsimtext, but executed as another name, eg pjrec, then program will use that // linked name as name of function. -static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.14 2001/01/13 05:15:44 kevin Exp $"; +static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.15 2001/01/16 20:55:29 kevin Exp $"; static const char* const s_szProgramName = "ctsimtext"; static const char* const s_szProgramName2 = "ctsimtext.exe"; @@ -129,7 +129,7 @@ ctsimtext_main (int argc, char * argv[]) char* pszInputLine = new char [s_MaxLineLength+1]; std::cout << szPrompt; std::cin.getline (pszInputLine, s_MaxLineLength); - + #ifdef DEBUG std::cout << "#" << pszInputLine << "#\n"; #endif @@ -147,7 +147,7 @@ ctsimtext_main (int argc, char * argv[]) std::cout << "Token " << i << ": " << argv[i] << "\n"; #endif iReturn = processCommand (argc, argv); - + delete pszInputLine; } } @@ -226,35 +226,41 @@ processCommand (int argc, char* const argv[]) { if (argc < 1) return 1; - + const char* const pszFunction = fileBasename (argv[0]); - if (strcasecmp (pszFunction, "if1") == 0) - return if1_main (argc, argv); - else if (strcasecmp (pszFunction, "if2") == 0) - return if2_main (argc, argv); - else if (strcasecmp (pszFunction, "ifexport") == 0) - return ifexport_main (argc, argv); - else if (strcasecmp (pszFunction, "ifinfo") == 0) - return ifinfo_main (argc, argv); - else if (strcasecmp (pszFunction, "phm2if") == 0) - return phm2if_main (argc, argv); - else if (strcasecmp (pszFunction, "phm2pj") == 0) - return phm2pj_main (argc, argv); - else if (strcasecmp (pszFunction, "pj2if") == 0) - return pj2if_main (argc, argv); - else if (strcasecmp (pszFunction, "pjinfo") == 0) - return pjinfo_main (argc, argv); - else if (strcasecmp (pszFunction, "pjrec") == 0) - return pjrec_main (argc, argv); - else { - std::cout << "Unknown function name: " << pszFunction << "\n"; - if (s_bInteractive) - interactive_usage(); - else - ctsimtext_usage (s_szProgramName); - return 1; - } + try { + if (strcasecmp (pszFunction, "if1") == 0) + return if1_main (argc, argv); + else if (strcasecmp (pszFunction, "if2") == 0) + return if2_main (argc, argv); + else if (strcasecmp (pszFunction, "ifexport") == 0) + return ifexport_main (argc, argv); + else if (strcasecmp (pszFunction, "ifinfo") == 0) + return ifinfo_main (argc, argv); + else if (strcasecmp (pszFunction, "phm2if") == 0) + return phm2if_main (argc, argv); + else if (strcasecmp (pszFunction, "phm2pj") == 0) + return phm2pj_main (argc, argv); + else if (strcasecmp (pszFunction, "pj2if") == 0) + return pj2if_main (argc, argv); + else if (strcasecmp (pszFunction, "pjinfo") == 0) + return pjinfo_main (argc, argv); + else if (strcasecmp (pszFunction, "pjrec") == 0) + return pjrec_main (argc, argv); + else { + std::cout << "Unknown function name: " << pszFunction << "\n"; + if (s_bInteractive) + interactive_usage(); + else + ctsimtext_usage (s_szProgramName); + return 1; + } + } catch (exception e) { + std::cerr << "Exception: " << e.what() << std::endl; + } catch (...) { +std:cerr << "Unknown exception caught\n"; + } } int @@ -262,14 +268,8 @@ main (int argc, char* argv[]) { int retval = 1; - try { - retval = ctsimtext_main(argc, argv); - } catch (exception e) { - std::cerr << "Exception: " << e.what() << std::endl; - } catch (...) { - std::cerr << "Unknown exception\n"; - } + retval = ctsimtext_main(argc, argv); - return (retval); + return retval; } diff --git a/tools/pj2if.cpp b/tools/pj2if.cpp index 0192898..29907f5 100644 --- a/tools/pj2if.cpp +++ b/tools/pj2if.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: pj2if.cpp,v 1.7 2000/12/17 23:30:48 kevin Exp $ +** $Id: pj2if.cpp,v 1.8 2001/01/16 20:55:29 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -36,33 +36,31 @@ #include "timer.h" -enum { O_VERBOSE, O_DUMP, O_HELP, O_VERSION }; +enum { O_VERBOSE, O_HELP, O_VERSION, O_POLAR }; static struct option my_options[] = { + {"polar", 0, 0, O_POLAR}, {"verbose", 0, 0, O_VERBOSE}, - {"dump", 0, 0, O_DUMP}, {"help", 0, 0, O_HELP}, {"version", 0, 0, O_VERSION}, {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: pj2if.cpp,v 1.7 2000/12/17 23:30:48 kevin Exp $"; +static const char* g_szIdStr = "$Id: pj2if.cpp,v 1.8 2001/01/16 20:55:29 kevin Exp $"; void pj2if_usage (const char *program) { std::cout << "usage: " << fileBasename(program) << " in-proj-file out-if-file [OPTIONS]\n"; - std::cout << "Converts a projection file to a IF file\n"; + std::cout << "Converts a projection file to a imagefile\n"; std::cout << std::endl; + std::cout << " --polar Convert to polar format\n"; std::cout << " --verbose Verbose mode\n"; - std::cout << " --dump Dump all scan data\n"; std::cout << " --version Print version\n"; std::cout << " --help Print this help message\n"; } - - int pj2if_main (const int argc, char *const argv[]) { @@ -83,9 +81,6 @@ pj2if_main (const int argc, char *const argv[]) case O_VERBOSE: optVerbose = true; break; - case O_DUMP: - optDump = true; - break; case O_VERSION: #ifdef VERSION std::cout << "Version " << VERSION << std::endl << g_szIdStr << std::endl; @@ -117,9 +112,7 @@ pj2if_main (const int argc, char *const argv[]) return (1); } - if (optDump) - pj.printProjectionData(); - else if (optVerbose) { + if (optVerbose) { std::ostringstream os; pj.printScanInfo (os); std::cout << os.str(); -- 2.34.1