X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fphantom.h;h=b1cb50fe9c7132584299c34bd896d1e802940946;hp=9fb91041aa3a280ba7d96824c42ae22d3c66c4b7;hb=747a2ec9e0f3c49723b36da0cc77270fbecc9dfe;hpb=1a050c98763fbbc0662731b0b76953acede6f5d7 diff --git a/include/phantom.h b/include/phantom.h index 9fb9104..b1cb50f 100644 --- a/include/phantom.h +++ b/include/phantom.h @@ -7,9 +7,7 @@ ** Date Started: July 1, 1984 ** ** This is part of the CTSim program -** Copyright (c) 1983-2001 Kevin Rosenberg -** -** $Id$ +** Copyright (c) 1983-2009 Kevin Rosenberg ** ** 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 @@ -105,11 +103,8 @@ class PhantomElement static const char* const convertTypeToName (PhmElemType iType); void makeTransformMatrices (); - void makeVectorOutline (); - void calcArcPoints (double x[], double y[], const int pts, const double xcent, const double ycent, const double r, const double start, const double stop); - void calcEllipsePoints (double x[], double y[], const int pts, const double u, const double v); static int numCirclePoints (double theta); @@ -152,15 +147,12 @@ class Phantom { return m_composition; } bool createFromPhantom (const char* const phmName); - bool createFromPhantom (const int phmid); - - bool createFromFile (const char* const fname); - + bool createFromPhmFile (const char* const fname); + bool createFromImageFile (const char* const fname); bool fileWrite (const char* const fname); void addPElem (const PhantomElement& pelem); - void addPElem (const char* const composition, const double cx, const double cy, const double u, const double v, const double rot, const double atten); void convertToImagefile (ImageFile& im, double dViewRatio, const int in_nsample, const int trace) const; @@ -202,6 +194,8 @@ class Phantom std::list& listPElem() {return m_listPElem;} const std::list& listPElem() const {return m_listPElem;} const int nPElem() const {return m_nPElem;} + const bool isImagefile(void) const { return m_im != NULL; } + const ImageFile* getImagefile() const { return m_im; } static const int getPhantomCount() {return s_iPhantomCount;} static const char** getPhantomNameArray() {return s_aszPhantomName;} @@ -222,6 +216,7 @@ class Phantom static const char* s_aszPhantomName[]; static const char* s_aszPhantomTitle[]; static const int s_iPhantomCount; + ImageFile* m_im; // If defining a phantom from an ImageFile void init();