diff options
author | Nicola Vigano <nicola.vigano@esrf.fr> | 2016-01-21 17:10:54 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-02-10 17:00:05 +0100 |
commit | 081355b609b11faf7f2d73414de9629e78cca2c5 (patch) | |
tree | c216392faa0ba985a2da81b9de74985e5409b35f | |
parent | 278618e2f70f6b1308bf9c0aa79f76137cc582c1 (diff) | |
download | astra-081355b609b11faf7f2d73414de9629e78cca2c5.tar.gz astra-081355b609b11faf7f2d73414de9629e78cca2c5.tar.bz2 astra-081355b609b11faf7f2d73414de9629e78cca2c5.tar.xz astra-081355b609b11faf7f2d73414de9629e78cca2c5.zip |
Refactor FP and BP jobs creation in the composite geometry manager
-rw-r--r-- | include/astra/CompositeGeometryManager.h | 7 | ||||
-rw-r--r-- | src/CompositeGeometryManager.cpp | 39 |
2 files changed, 32 insertions, 14 deletions
diff --git a/include/astra/CompositeGeometryManager.h b/include/astra/CompositeGeometryManager.h index 49d02a7..4338994 100644 --- a/include/astra/CompositeGeometryManager.h +++ b/include/astra/CompositeGeometryManager.h @@ -137,6 +137,13 @@ public: bool doJobs(TJobList &jobs); + SJob createJobFP(CProjector3D *pProjector, + CFloat32VolumeData3DMemory *pVolData, + CFloat32ProjectionData3DMemory *pProjData); + SJob createJobBP(CProjector3D *pProjector, + CFloat32VolumeData3DMemory *pVolData, + CFloat32ProjectionData3DMemory *pProjData); + // Convenience functions for creating and running a single FP or BP job bool doFP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, CFloat32ProjectionData3DMemory *pProjData); diff --git a/src/CompositeGeometryManager.cpp b/src/CompositeGeometryManager.cpp index d1b713e..96b28e9 100644 --- a/src/CompositeGeometryManager.cpp +++ b/src/CompositeGeometryManager.cpp @@ -684,13 +684,12 @@ CCompositeGeometryManager::CProjectionPart* CCompositeGeometryManager::CProjecti return new CProjectionPart(*this); } - -bool CCompositeGeometryManager::doFP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData) +CCompositeGeometryManager::SJob CCompositeGeometryManager::createJobFP(CProjector3D *pProjector, + CFloat32VolumeData3DMemory *pVolData, + CFloat32ProjectionData3DMemory *pProjData) { - ASTRA_DEBUG("CCompositeGeometryManager::doFP"); + ASTRA_DEBUG("CCompositeGeometryManager::createJobFP"); // Create single job for FP - // Run result CVolumePart *input = new CVolumePart(); input->pData = pVolData; @@ -715,18 +714,15 @@ bool CCompositeGeometryManager::doFP(CProjector3D *pProjector, CFloat32VolumeDat FP.eType = SJob::JOB_FP; FP.eMode = SJob::MODE_SET; - TJobList L; - L.push_back(FP); - - return doJobs(L); + return FP; } -bool CCompositeGeometryManager::doBP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, - CFloat32ProjectionData3DMemory *pProjData) +CCompositeGeometryManager::SJob CCompositeGeometryManager::createJobBP(CProjector3D *pProjector, + CFloat32VolumeData3DMemory *pVolData, + CFloat32ProjectionData3DMemory *pProjData) { - ASTRA_DEBUG("CCompositeGeometryManager::doBP"); + ASTRA_DEBUG("CCompositeGeometryManager::createJobBP"); // Create single job for BP - // Run result CProjectionPart *input = new CProjectionPart(); input->pData = pProjData; @@ -749,8 +745,23 @@ bool CCompositeGeometryManager::doBP(CProjector3D *pProjector, CFloat32VolumeDat BP.eType = SJob::JOB_BP; BP.eMode = SJob::MODE_SET; + return BP; +} + +bool CCompositeGeometryManager::doFP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, + CFloat32ProjectionData3DMemory *pProjData) +{ + TJobList L; + L.push_back(createJobFP(pProjector, pVolData, pProjData)); + + return doJobs(L); +} + +bool CCompositeGeometryManager::doBP(CProjector3D *pProjector, CFloat32VolumeData3DMemory *pVolData, + CFloat32ProjectionData3DMemory *pProjData) +{ TJobList L; - L.push_back(BP); + L.push_back(createJobBP(pProjector, pVolData, pProjData)); return doJobs(L); } |