r148: *** empty log message ***
[ctsim.git] / include / phantom.h
index b3765c687970562ce7a44e365f9ebf5ceb0707b1..ad8b0f8c8bc81dcff9c5128dc0f5d7c16e56afc3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.h,v 1.3 2000/06/22 10:17:28 kevin Exp $
+**  $Id: phantom.h,v 1.6 2000/07/15 08:36:13 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
@@ -80,9 +80,9 @@ class PhantomElement
 
  private:
     PhmElemType m_type;             // pelem type (box, ellipse, etc)
-    double m_atten;         // X-ray attenuation coefficient
     double m_cx, m_cy;      // center of pelem 
     double m_u, m_v;                // size of pelem 
+    double m_atten;         // X-ray attenuation coefficient
     double m_rot;                   // pelem rotation angle (in radians) 
     double *m_x, *m_y;      // ptr to array of points in obj world coord 
     int m_nPoints;                  // number of points in outline arrays 
@@ -109,6 +109,8 @@ class PhantomElement
 
     static int numCirclePoints (double theta);
 
+    PhantomElement (const PhantomElement& rhs);        // copy constructor
+    PhantomElement& operator= (const PhantomElement&); // assignment operator
 };
 
 
@@ -132,6 +134,11 @@ class Phantom
       PHM_UNITPULSE             /* Unit pulse phantom */
     } PhantomID;
 
+    static const char PHM_HERMAN_STR[]=    "herman";
+    static const char PHM_BHERMAN_STR[]=   "bherman";
+    static const char PHM_ROWLAND_STR[]=   "rowland";
+    static const char PHM_BROWLAND_STR[]=  "browland";
+    static const char PHM_UNITPULSE_STR[]= "unitpulse";
 
     Phantom (void);
     Phantom (const char* const phmName);
@@ -158,14 +165,10 @@ class Phantom
 
     void convertToImagefile (ImageFile& im, const int in_nsample, const int trace) const;
 
-    bool fail(void) const 
-      {return m_fail;}
-
-    const string& name(void) const
-      {return m_name;}
-
-    const PhantomID id(void) const
-      {return m_id;}
+    bool fail(void) const             {return m_fail;}
+    const string& failMessage(void) const {return m_failMessage;}
+    const string& name(void) const     {return m_name;}
+    const PhantomID id(void) const     {return m_id;}
 
 #if HAVE_SGP
     void show (void) const;
@@ -199,17 +202,16 @@ class Phantom
     string m_name;
     PhantomID m_id;
     bool m_fail;
+    string m_failMessage;
 
     // Standard phantomsa
-    static const char PHM_HERMAN_STR[]=    "herman";
-    static const char PHM_BHERMAN_STR[]=   "bherman";
-    static const char PHM_ROWLAND_STR[]=   "rowland";
-    static const char PHM_BROWLAND_STR[]=  "browland";
-    static const char PHM_UNITPULSE_STR[]= "unitpulse";
     static PhantomID convertNameToPhantomID (const char* const phmName);
     static const char* convertPhantomIDToName (const PhantomID phmID);
 
     void init(void);
+
+    Phantom (const Phantom& rhs);        // copy constructor
+    Phantom& operator= (const Phantom&); // assignment operator
 };
 
 typedef slist<PhantomElement*>::iterator PElemIterator;