+bool
+Phantom::createFromImageFile (const char* const fname)
+{
+ bool bGoodFile = true;
+
+ m_im = new ImageFile ();
+ if (! m_im || ! m_im->fileRead (fname)) {
+ sys_error (ERR_SEVERE, "Unable to read image file %s", fname);
+ bGoodFile = false;
+ delete m_im;
+ m_im = NULL;
+ m_fail = true;
+ } else {
+ m_name = fname;
+ m_id = -1;
+ m_fail = false;
+
+ if (! m_im->getAxisExtent(m_xmin, m_xmax, m_ymin, m_ymax)) {
+ m_xmax = m_im->nx() / 2.; m_xmin = -m_xmax;
+ m_ymax = m_im->ny() / 2.; m_ymin = -m_ymax;
+ }
+ }
+
+ return (bGoodFile);
+}
+