lavi-usp / dbt-reconstruction Goto Github PK
View Code? Open in Web Editor NEWLAVI open-source reconstruction toolbox for digital breast tomosynthesis (DBT)
License: GNU General Public License v3.0
LAVI open-source reconstruction toolbox for digital breast tomosynthesis (DBT)
License: GNU General Public License v3.0
Hello,
I run SART
algorithm for reconstructing images. I understand that the function dataPreprocess
resizes the projection data to contain only the needed object and SART
algorithm reconstructs images to this projection data size. I have a few questions:
How can I set image dimensions (widthxheight) for reconstructed images? For example I have detector panel pixel density as
parameter.nu = 2816;
parameter.nv = 3584;
But want to get reconstructed images in dimenstions of 803x1127 (WidthxHeight)
. How can I specify image dimensions?
Second question is regarding function dataPreprocess
. The segmentation crops projection data and we loose information from the removed part. How can we get information from this part for the reconstructed images?
It would be very helpful if you can provide some inputs on this.
Thanks.
Hello,
I run FBP
algorithm for reconstructing images from DBT breast phantom raw data. The reconstructed images look blurry and lack details when compared with image outputs from actual DBT system. The actual number of slices is 171. Here I am reconstructing only 16 slices and parameter.dz
was modified accordingly.
I believe I have some serious issues with geometry parameter settings. Could you please have a look at the following geometry definition and comment on any flaws. I attach a pictorial representation for the geometry of DBT system.
The geometry definition follows.
% Breast voxels density
parameter.nx = 2816; % number of voxels (columns)
parameter.ny = 3584; % number of voxels (rows)
parameter.nz = 16; % actual number of slices=171 number of voxels (slices)
% Detector panel pixel density
parameter.nu = 2816; % number of pixels (columns)
parameter.nv = 3584; % number of pixels (rows)
% Single voxel real size (mm)
parameter.dx = 0.25; % on the X axis (mm)
parameter.dy = 0.25; % on the Y axis (mm)
parameter.dz = 2.5; % 0.25; on the Z axis (mm)
% Single detector real size (mm)
parameter.du = 0.25; % on the X axis (mm)
parameter.dv = 0.25; % on the Y axis (mm)
% X-ray source and detector distances
parameter.DSD = 650; % Distance from source to detector (mm)
parameter.DSO = 593; % Distance from source to the top of object (mm)
parameter.DDR = 17; % Distance from detector to pivot (mm)
parameter.DSR = parameter.DSD - parameter.DDR; % Distance from source to pivot (mm)
parameter.DAG = 15; % Distance of Air Gap (mm)
% Number of Projections
parameter.nProj = 16;
% Angle settings (Degrees)
parameter.tubeAngle = 15; % Tube Angle
parameter.tubeDeg = linspace(-parameter.tubeAngle/2,parameter.tubeAngle/2,parameter.nProj);
parameter.detAngle = 0; % Detector Angle
parameter.detectorDeg = linspace(-parameter.detAngle/2,parameter.detAngle/2,parameter.nProj);
Raw data matrix shared at
https://drive.google.com/drive/folders/10er-5LklkIFZc3BR0Z_AKhpyFiaivTIC?usp=sharing
I also attach reconstructed image outputs from code and machine.
code_output.zip
machine_output.zip
It would be very helpful if you can provide some inputs on this.
Thanks.
Dear Rodrigo;
I am trying to run it for a prototype system where the input data is in tiff files. Also the geometry is also different. My geometry is 9 angular projections over 15 degree angular span. Here is the attached pdf file for the schematics.
details.pdf
What changes we need to make for the tiff file and different geometry.
Hello,
I compiled the .sln
files under Functions/Sources
in Visual studio IDE
and built files backprojectionDDb_mex_CUDA.mexw64
and projectionDDb_mex_CUDA.mexw64
. SART algorithm requires projection and backprojection to run for each iteration and under each iteration for each projection. The CUDA version of these methods seem to accept only two parameters and so the projection number cannot be passed.
The modified projection and backprojection function calls in SART.m
proj_norm = projection(ones(parameter.ny, parameter.nx, parameter.nz, 'single'),parameter, []);
to
proj_norm = projectionDDb_mex_CUDA(ones(parameter.ny, parameter.nx, parameter.nz, 'double'),parameter);
vol_norm = backprojection(ones(parameter.nv, parameter.nu, parameter.nProj, 'single'), parameter, []);
to
vol_norm = backprojectionDDb_mex_CUDA(ones(parameter.nv, parameter.nu, parameter.nProj, 'double'), parameter);
proj_diff = proj(:,:,p) - projection(reconData3d,parameter,p);
to
proj_diff = proj(:,:,p) - projectionDDb_mex_CUDA(reconData3d,parameter,p);
upt_term = backprojection(proj_diff,parameter,p);
to
upt_term = backprojectionDDb_mex_CUDA(proj_diff,parameter,p);
The SART execution shows error
Error using projectionDDb_mex_CUDA
projection_mex requires two input arguments.
Error in SART (line 87)
proj_diff = proj(:,:,p) - projectionDDb_mex_CUDA(reconData3d,parameter,p);
How can I run cuda versions of methods for SART iterations?
Thanks.
Hi
I tried reconstruction using the FBP algorithm. The objects in the reconstructed images were observed to be shifted in a vertical direction. The images were taken with a static detector. From 0th slice to nth slice, the fibers in the images were moving from downward to upward direction. The machine parameters were listed below,
##Breast voxels density
parameter.nx = 2304; % number of voxels (columns)
parameter.ny = 2945; % number of voxels (rows)
parameter.nz = 55; % number of voxels (slices)
parameter.nu = 2304; % number of pixels (columns)
parameter.nv = 2945; % number of pixels (rows)
##Single voxel real size (mm)
parameter.dx = 0.099;
parameter.dy = 0.099;
parameter.dz = 1;
parameter.du = 0.099;
parameter.dv = 0.099;
##X-ray source and detector distances
parameter.DSD = 650; % Distance from source to detector (mm)
parameter.DSO = 608; % Distance from source to the top of object (mm)
parameter.DDR = 10; % Distance from detector to pivot (mm)
parameter.DSR = parameter.DSD - parameter.DDR; % Distance from source to pivot (mm)
parameter.DAG = 1; % Distance of Air Gap (mm)
parameter.bitDepth = 16; % Load from dicom header
parameter.tubeAngle = 11; % Tube Angle
parameter.tubeDeg = linspace(-parameter.tubeAngle/2,parameter.tubeAngle/2,parameter.nProj);
I have tried flipping the parameter.tubeDeg angle from positive to negative[8 6 4 2 0 -2 -4 -6 -8]. But this method is also not working.
All these information would be helpful for if you can provide me some ideas for resolving this issue.
Hi
I came across this algorithm recently and I tried to reconstruct using FBP algorithm. The reconstructed images has the objects in every slices in shifted manner. My object size is around 55mm and tried to reconstruct into 110 slices each of 0.5mm. My machine parameters are shared below in the parameter settings. The image are taken from the machine with a static detector. I am sharing the projection data as mat file along with a reconstructed slice in jpg format. It would be helpful for if you can provide me some inputs for resolving this.
The projection data is available in below link
https://www.sendspace.com/file/emnp03
%% Physical Parameters Settings
% Breast voxels density
parameter.nx = 2304; % number of voxels (columns)
parameter.ny = 2945; % number of voxels (rows)
parameter.nz = 110; % number of voxels (slices)
% Detector panel pixel density
parameter.nu = 2304; % number of pixels (columns)
parameter.nv = 2945; % number of pixels (rows)
% Single voxel real size (mm)
parameter.dx = 0.098;
parameter.dy = 0.098;
parameter.dz = 0.5;
% Single detector real size (mm);
parameter.du = 0.098;
parameter.dv = 0.098;
% X-ray source and detector distances
parameter.DSD = 650; % Distance from source to detector (mm)
parameter.DSO = 608; % Distance from source to the top of object (mm)
parameter.DDR = 12; % Distance from detector to pivot (mm)
parameter.DSR = parameter.DSD - parameter.DDR; % Distance from source to pivot (mm)
parameter.DAG = 1; % Distance of Air Gap (mm)
% Detector and object full real sizes (mm)
parameter.sx = parameter.nx.*parameter.dx;
parameter.sy = parameter.ny.*parameter.dy;
parameter.sz = (parameter.nz.*parameter.dz)+parameter.DAG;
parameter.su = parameter.nu.*parameter.du;
parameter.sv = parameter.nv.*parameter.dv;
% Detector and object Volume grid settings
parameter.xs = (parameter.nx-1:-1:0)*parameter.dx;
parameter.ys = (-(parameter.ny-1)/2:1:(parameter.ny-1)/2)*parameter.dy;
parameter.zs = (0:1:parameter.nz-1)*parameter.dz + parameter.DAG;
parameter.us = (parameter.nu-1:-1:0)*parameter.du;
parameter.vs = (-(parameter.nv-1)/2:1:(parameter.nv-1)/2)*parameter.dv;
% Number of Projections
parameter.nProj = 7;
% Angle settings (Degrees)
parameter.tubeAngle = 12; % Tube Angle
parameter.tubeDeg = linspace(-parameter.tubeAngle/2,parameter.tubeAngle/2,parameter.nProj);
parameter.detAngle = 0; % Detector Angle
parameter.detectorDeg = linspace(-parameter.detAngle/2,parameter.detAngle/2,parameter.nProj);
%% General parameters
% Slice range to be saved
parameter.sliceRange = 1:parameter.nz;
% Region of interest (ROI) to store
parameter.iROI = 1:parameter.ny;
parameter.jROI = 1:parameter.nx;
% Bit number quatization
parameter.bitDepth = 16; % Load from dicom header
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.