X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fbackprojectors.cpp;h=fc3c95882dd768458613be752749c10e759978a9;hp=ebfe2a4358326b16aafafb2b30ef8fe84b3240f9;hb=7df269f65639c1a862a58649c48331824029128a;hpb=9776c9a12ba53419d34563a5ec57c90e3d6798f4 diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index ebfe2a4..fc3c958 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: backprojectors.cpp,v 1.27 2001/02/22 18:22:40 kevin Exp $ +** $Id: backprojectors.cpp,v 1.28 2001/02/23 02:06:01 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 @@ -113,6 +113,13 @@ Backprojector::BackprojectView (const double* const viewData, const double viewA m_pBackprojectImplem->BackprojectView (viewData, viewAngle); } +void +Backprojector::PostProcessing() +{ + if (m_pBackprojectImplem != NULL) + m_pBackprojectImplem->PostProcessing(); +} + Backprojector::~Backprojector () { delete m_pBackprojectImplem; @@ -254,7 +261,7 @@ Backprojector::convertInterpIDToTitle (const int interpID) // Pure virtual base class for all backprojectors. Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType, const int interpFactor) -: proj(proj), im(im), interpType(interpType), m_interpFactor(interpFactor) +: proj(proj), im(im), interpType(interpType), m_interpFactor(interpFactor), m_bPostProcessingDone(false) { detInc = proj.detInc(); nDet = proj.nDet(); @@ -287,6 +294,12 @@ Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType Backproject::~Backproject () {} +void +Backproject::PostProcessing() +{ + m_bPostProcessingDone = true; +} + void Backproject::ScaleImageByRotIncrement () { @@ -389,7 +402,15 @@ BackprojectTable::BackprojectTable (const Projections& proj, ImageFile& im, int BackprojectTable::~BackprojectTable () { - ScaleImageByRotIncrement(); +} + +void +BackprojectTable::PostProcessing() +{ + if (! m_bPostProcessingDone) { + ScaleImageByRotIncrement(); + m_bPostProcessingDone = true; + } } void @@ -451,11 +472,18 @@ BackprojectDiff::BackprojectDiff (const Projections& proj, ImageFile& im, int in im.arrayDataClear(); } -BackprojectDiff::~BackprojectDiff() +BackprojectDiff::~BackprojectDiff () { - ScaleImageByRotIncrement(); } +void +BackprojectDiff::PostProcessing() +{ + if (! m_bPostProcessingDone) { + ScaleImageByRotIncrement(); + m_bPostProcessingDone = true; + } +} void BackprojectDiff::BackprojectView (const double* const filteredProj, const double view_angle)