X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fphantom.cpp;h=7acfc3fc9ccba40168f889867ed5b404b04bd299;hp=dba6576c8cf2b78761c38a47fca530bab4b8ffec;hb=e4c1f7f8eb87558c3abf3bf1d20732361f425351;hpb=ebe18bbc459204f8bf89880459804cc643a32f24 diff --git a/libctsim/phantom.cpp b/libctsim/phantom.cpp index dba6576..7acfc3f 100644 --- a/libctsim/phantom.cpp +++ b/libctsim/phantom.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phantom.cpp,v 1.6 2000/07/13 07:03:21 kevin Exp $ +** $Id: phantom.cpp,v 1.7 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 @@ -294,17 +294,15 @@ Phantom::show (void) const ymax = ymin + wsize; printf("Drawing Phantom:\n\n"); - printf(" data limits: %9.3g, %9.3g, %9.3g, %9.3g\n", - m_xmin, m_ymin, m_xmax, m_ymax); - printf(" window size: %9.3g, %9.3g, %9.3g, %9.3g\n", - xmin, ymin, xmax, ymax); + printf(" data limits: %9.3g, %9.3g, %9.3g, %9.3g\n", m_xmin, m_ymin, m_xmax, m_ymax); + printf(" window size: %9.3g, %9.3g, %9.3g, %9.3g\n", xmin, ymin, xmax, ymax); - gid = sgp2_init(0, 0, "Phantom Show"); + gid = sgp2_init (0, 0, "Phantom Show"); sgp2_window (xmin, ymin, xmax, ymax); draw(); - termgrf2(); + sgp2_close (gid); } #endif @@ -338,17 +336,17 @@ Phantom::draw (void) const void Phantom::addStdRowland (void) { - addPElem("ellipse", 0.0000, 0.0000, 0.6900, 0.9200, 0.0, 1.00); - addPElem("ellipse", 0.0000, -0.0184, 0.6624, 0.8740, 0.0, -0.98); - addPElem("ellipse", 0.2200, 0.0000, 0.1100, 0.3100, -18.0, -0.02); - addPElem("ellipse", -0.2200, 0.0000, 0.1600, 0.4100, 18.0, -0.02); - addPElem("ellipse", 0.0000, 0.3500, 0.2100, 0.2500, 0.0, 0.01); - addPElem("ellipse", 0.0000, 0.1000, 0.0460, 0.0460, 0.0, 0.01); - addPElem("ellipse", 0.0000, -0.1000, 0.0460, 0.0460, 0.0, 0.01); - addPElem("ellipse", -0.0800, -0.6050, 0.0460, 0.0230, 0.0, 0.01); - addPElem("ellipse", 0.0000, -0.6050, 0.0230, 0.0230, 0.0, 0.01); - addPElem("ellipse", 0.0600, -0.6050, 0.0230, 0.0230, 0.0, 0.01); - addPElem("ellipse", 0.5538, -0.3858, 0.0330, 0.2060, -18.0, 0.03); + addPElem ("ellipse", 0.0000, 0.0000, 0.6900, 0.9200, 0.0, 1.00); + addPElem ("ellipse", 0.0000, -0.0184, 0.6624, 0.8740, 0.0, -0.98); + addPElem ("ellipse", 0.2200, 0.0000, 0.1100, 0.3100, -18.0, -0.02); + addPElem ("ellipse", -0.2200, 0.0000, 0.1600, 0.4100, 18.0, -0.02); + addPElem ("ellipse", 0.0000, 0.3500, 0.2100, 0.2500, 0.0, 0.01); + addPElem ("ellipse", 0.0000, 0.1000, 0.0460, 0.0460, 0.0, 0.01); + addPElem ("ellipse", 0.0000, -0.1000, 0.0460, 0.0460, 0.0, 0.01); + addPElem ("ellipse", -0.0800, -0.6050, 0.0460, 0.0230, 0.0, 0.01); + addPElem ("ellipse", 0.0000, -0.6050, 0.0230, 0.0230, 0.0, 0.01); + addPElem ("ellipse", 0.0600, -0.6050, 0.0230, 0.0230, 0.0, 0.01); + addPElem ("ellipse", 0.5538, -0.3858, 0.0330, 0.2060, -18.0, 0.03); } void @@ -369,27 +367,28 @@ Phantom::addStdRowlandBordered (void) void Phantom::addStdHerman (void) { - addPElem("ellipse", 0.000, 1.50, 0.375, 0.3000, 90.00, -0.003); - addPElem("ellipse", 0.675, -0.75, 0.225, 0.1500, 140.00, 0.010); - addPElem("ellipse", 0.750, 1.50, 0.375, 0.2250, 50.00, 0.003); - addPElem("segment", 1.375, -7.50, 1.100, 0.6250, 19.20, -0.204); - addPElem("segment", 1.375, -7.50, 1.100, 4.3200, 19.21, 0.204); - addPElem("segment", 0.000, -2.25, 1.125, 0.3750, 0.00, -0.003); - addPElem("segment", 0.000, -2.25, 1.125, 3.0000, 0.00, 0.003); - addPElem("segment", -1.000, 3.75, 1.000, 0.5000, 135.00, -0.003); - addPElem("segment", -1.000, 3.75, 1.000, 3.0000, 135.00, 0.003); - addPElem("segment", 1.000, 3.75, 1.000, 0.5000, 225.00, -0.003); - addPElem("segment", 1.000, 3.75, 1.000, 3.0000, 225.00, 0.003); - addPElem("triangle", 5.025, 3.75, 1.125, 0.5000, 110.75, 0.206); - addPElem("triangle",-5.025, 3.75, 1.125, 0.9000,-110.75, 0.206); - addPElem("ellipse", 0.000, 0.00, 8.625, 6.4687, 90.00, 0.416); - addPElem("ellipse", 0.000, 0.00, 7.875, 5.7187, 90.00, -0.206); + addPElem ("ellipse", 0.000, 1.50, 0.375, 0.3000, 90.00, -0.003); + addPElem ("ellipse", 0.675, -0.75, 0.225, 0.1500, 140.00, 0.010); + addPElem ("ellipse", 0.750, 1.50, 0.375, 0.2250, 50.00, 0.003); + addPElem ("segment", 1.375, -7.50, 1.100, 0.6250, 19.20, -0.204); + addPElem ("segment", 1.375, -7.50, 1.100, 4.3200, 19.21, 0.204); + addPElem ("segment", 0.000, -2.25, 1.125, 0.3750, 0.00, -0.003); + addPElem ("segment", 0.000, -2.25, 1.125, 3.0000, 0.00, 0.003); + addPElem ("segment", -1.000, 3.75, 1.000, 0.5000, 135.00, -0.003); + addPElem ("segment", -1.000, 3.75, 1.000, 3.0000, 135.00, 0.003); + addPElem ("segment", 1.000, 3.75, 1.000, 0.5000, 225.00, -0.003); + addPElem ("segment", 1.000, 3.75, 1.000, 3.0000, 225.00, 0.003); + addPElem ("triangle", 5.025, 3.75, 1.125, 0.5000, 110.75, 0.206); + addPElem ("triangle",-5.025, 3.75, 1.125, 0.9000,-110.75, 0.206); + addPElem ("ellipse", 0.000, 0.00, 8.625, 6.4687, 90.00, 0.416); + addPElem ("ellipse", 0.000, 0.00, 7.875, 5.7187, 90.00, -0.206); } void Phantom::addStdHermanBordered (void) { - addPElem("ellipse", 0., 0., 6.6, 5.9, 90., 0.); + addStdHerman(); + addPElem ("ellipse", 0.000, 0.000, 8.650, 8.650, 0.00, 0.000); }