** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: projections.cpp,v 1.1 2000/06/19 02:59:34 kevin Exp $
+** $Id: projections.cpp,v 1.2 2000/06/19 17:58:20 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
*/
Projections::Projections (const Scanner& scanner)
+ : m_projData(0)
{
- init (scanner.nView(), scanner.nDet());
-
- m_phmLen = scanner.phmLen();
- m_rotInc = scanner.rotInc();
- m_detInc = scanner.detInc();
- m_rotStart = 0;
- m_detStart = -scanner.radius() + (scanner.detInc() / 2);
- m_phmLen = scanner.phmLen();
+ initFromScanner (scanner);
}
Projections::Projections (const int nView, const int nDet)
+ : m_projData(0)
{
init (nView, nDet);
}
Projections::Projections (void)
+ : m_projData(0)
{
init (0, 0);
}
{
m_nView = nView;
m_nDet = nDet;
- m_projData = NULL;
newProjData ();
- m_fd = -1;
}
+void
+Projections::initFromScanner (const Scanner& scanner)
+{
+ deleteProjData();
+ init (scanner.nView(), scanner.nDet());
+
+ m_phmLen = scanner.phmLen();
+ m_rotInc = scanner.rotInc();
+ m_detInc = scanner.detInc();
+ m_rotStart = 0;
+ m_detStart = -scanner.radius() + (scanner.detInc() / 2);
+ m_phmLen = scanner.phmLen();
+}
+
+void
+Projections::setNView (int nView) // used by MPI to reduce # of views
+{
+ deleteProjData();
+ init (nView, m_nDet);
+}
// NAME
// newProjData