X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Fprojections.cpp;h=bdcf35e63089e3703929b1865b5374edbc45135b;hb=0eb095f799dd4222e6eb9b1db9e8c6f2831a1540;hp=d2ab2b69e189409ce08fb007b8116c0e6da7c3c9;hpb=9324f74c9b1dcbb6aae655dbb24ca05284a144df;p=ctsim.git diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index d2ab2b6..bdcf35e 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.33 2000/12/17 22:30:09 kevin Exp $ +** $Id: projections.cpp,v 1.36 2001/01/03 22:00:46 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 @@ -25,8 +25,8 @@ ******************************************************************************/ #include "ct.h" - -const kuint16 Projections::m_signature = ('P'*256 + 'J'); + +const kuint16 Projections::m_signature = ('P'*256 + 'J'); /* NAME * Projections Constructor for projections matrix storage @@ -71,6 +71,15 @@ Projections::init (const int nView, const int nDet) m_nView = nView; m_nDet = nDet; newProjData (); + + time_t t = time (NULL); + tm* lt = localtime (&t); + m_year = lt->tm_year; + m_month = lt->tm_mon; + m_day = lt->tm_mday; + m_hour = lt->tm_hour; + m_minute = lt->tm_min; + m_second = lt->tm_sec; } void @@ -262,7 +271,7 @@ Projections::headerRead (fnetorderstream& fs) } pszRemarkStorage[_remarksize] = 0; m_remark = pszRemarkStorage; - delete pszRemarkStorage; + delete pszRemarkStorage; off_t _hsizeread = fs.tellg(); if (!fs || _hsizeread != _hsize) { @@ -307,12 +316,12 @@ Projections::read (const std::string& filename) bool Projections::read (const char* filename) { - m_filename = filename; -#ifdef MSVC - frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary); -#else - frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary | std::ios::nocreate); -#endif + m_filename = filename; +#ifdef MSVC + frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary); +#else + frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary | std::ios::nocreate); +#endif if (fileRead.fail()) return false; @@ -442,17 +451,6 @@ Projections::write (const char* filename) return false; } -#ifdef HAVE_TIME - time_t t = time(NULL); - tm* lt = localtime(&t); - m_year = lt->tm_year; - m_month = lt->tm_mon; - m_day = lt->tm_mday; - m_hour = lt->tm_hour; - m_minute = lt->tm_min; - m_second = lt->tm_sec; -#endif - if (! headerWrite (fs)) return false; @@ -611,4 +609,15 @@ Projections::printScanInfo (std::ostringstream& os) const } +bool Projections::convertPolar (ImageFile& rIF, int iInterpolation) +{ + return false; +} + +bool Projections::convertFFTPolar (ImageFile& rIF, int iInterpolation, int iZeropad) +{ + return false; +} + +