FBP.m 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. %% Author: Rodrigo de Barros Vimieiro
  2. % Date: April, 2018
  3. % rodrigo.vimieiro@gmail.com
  4. % =========================================================================
  5. %{
  6. % -------------------------------------------------------------------------
  7. % FBP(proj,filterType,cutoff,filterOrder,parameter)
  8. % -------------------------------------------------------------------------
  9. % DESCRIPTION:
  10. % This function makes the Filtered Backprojection of 2D images,
  11. % in order to reconstruct a certain number of slices.
  12. %
  13. % The geometry is for DBT with half cone-beam. All parameters are set
  14. % in "ParameterSettings" code.
  15. %
  16. % INPUT:
  17. %
  18. % - proj = 2D projection images
  19. % - filterType = Filter type to be used
  20. % - cutoff = Cut off frequency up to Nyquist
  21. % - filterOrder = Butterworth filter order
  22. % - parameter = Parameter of all geometry
  23. %
  24. % OUTPUT:
  25. %
  26. % - reconData3d{1} = Volume data reconstructed with FBP.
  27. % - reconData3d{2} = Struct informations like - Filter and Bp Time
  28. %
  29. % Reference: Jiang Hsieh's book (second edition)
  30. % Reference: Fessler, J. A.: Fundamentals of CT Reconstruction in 2D
  31. % and 3D. In: Brahme, A. (eds.) Comprehensive Biomedical Physics,
  32. % 1st ed., vol. 2, pp 263-295. Elsevier, Netherlands (2014).
  33. % doi:10.1016/B978-0-444-53632-7.00212-4.
  34. % Reference: Fessler Book -> (http://web.eecs.umich.edu/~fessler/book/c-tomo.pdf)
  35. %
  36. % -----------------------------------------------------------------------
  37. % Copyright (C) <2018> <Rodrigo de Barros Vimieiro>
  38. %
  39. % This program is free software: you can redistribute it and/or modify
  40. % it under the terms of the GNU General Public License as published by
  41. % the Free Software Foundation, either version 3 of the License, or
  42. % (at your option) any later version.
  43. %
  44. % This program is distributed in the hope that it will be useful,
  45. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  46. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  47. % GNU General Public License for more details.
  48. %
  49. % You should have received a copy of the GNU General Public License
  50. % along with this program. If not, see <http://www.gnu.org/licenses/>.
  51. %}
  52. % =========================================================================
  53. %% Recon Code - Analytical reconstruction: FBP
  54. function reconData3d = FBP(proj,filterType,cutoff,filterOrder,parameter)
  55. global showinfo
  56. info.startDateAndTime = char(datetime('now','Format','MM-dd-yyyy'' ''HH:mm:ss'));
  57. info.reconMeth = filterType;
  58. if(showinfo)
  59. fprintf(' -> FBP... \n')
  60. end
  61. if(strcmp(filterType,'FBP'))
  62. tStart = tic;
  63. fprintf('Filtering projections ')
  64. proj = filterProj(proj,parameter,cutoff,filterOrder); % Filter projections
  65. info.FilterTime = num2str(toc(tStart));
  66. info.CutOffFreq = num2str(cutoff);
  67. end
  68. tStart = tic;
  69. % Make the Backprojection
  70. fprintf('\nBack-projecting projections ')
  71. reconData3d = backprojection(proj,parameter,[]);
  72. info.BackprojectTime = num2str(toc(tStart));
  73. % Store only interested slices and ROIs
  74. fprintf('\nStoring slices...')
  75. reconData3d = {reconData3d(parameter.iROI,parameter.jROI,parameter.sliceRange)};
  76. reconData3d{2,1} = info;
  77. end