Commit 59f33bfa authored by Johannes Maul's avatar Johannes Maul
Browse files

Commentary Update

parent c0cb9dc4
function [attenuationValues, attenuationPicture] = attenuationCalculationWrapper (detectorPositionCoordinates, faces, nodes, source, detectorSizeUint,attenuationCoefficentValues, photons)
[attenuationValues, ~] = nv_ray_tracing_basic(detectorPositionCoordinates, faces, nodes, source, detectorSizeUint,attenuationCoefficentValues); %parameters always in this order
[attenuationValues, profiling] = nv_ray_tracing_basic(detectorPositionCoordinates, faces, nodes, source, detectorSizeUint,attenuationCoefficentValues); %parameters always in this order %profiling can be activated all the time. Doesnt effect the execution time for big examples
attenuationValues = exp(attenuationValues * photons);%for correctnes of Beer-Lambert-Law % EXP and LOG not on GPU because GLSL just offers single precision. Same Example'll lose details.
attenuationValues = -log(attenuationValues);%For better image vision
attenuationPicture = reshape(attenuationValues,detectorSizeUint);
%times = reformatProfile(profiling);
times = reformatProfile(profiling);
%debugMissFormated = reshape(debugMiss,[200 detectorSizeUint(1) detectorSizeUint(2)]);
end
\ No newline at end of file
......@@ -24,7 +24,7 @@ function easyExample(exampleType, buildDefault)
testVolume = ones(testVolumeSize)+2;
isoValues = [1];
source = [testVolumeSize(2)/2 testVolumeSize(1)/2 testVolumeSize(3)*1000];%centered above the test volume
attenuationCoefficentValues = [ -0.3403, -0.1500, -0.3783];%1 = gland, 2=fat,3=muscle %K. Bliznakova et al. "A three-dimensional breast software phantom for mammography simulation" , 2003, Phys. Med. Biol., 48, 3699
attenuationCoefficentValues = [ -0.372, -0.25, -0.38];%1 = gland, 2=fat,3=muscle %K. Bliznakova et al. "A three-dimensional breast software phantom for mammography simulation" , 2003, Phys. Med. Biol., 48, 3699
end
if exampleType == "easy"
testVolumeSize = [100 120 50];
......@@ -36,7 +36,7 @@ function easyExample(exampleType, buildDefault)
attenuationCoefficentValues = [-0.372, -0.25, -0.38];%1 = gland, 2=fat,3=muscle %K. Bliznakova et al. "A three-dimensional breast software phantom for mammography simulation" , 2003, Phys. Med. Biol., 48, 3699
end
[nodes,~,faces] = vol2mesh(uint8(testVolume),1:testVolumeSize(1),1:testVolumeSize(2),1:testVolumeSize(3),1.5,1.5,1,'cgalmesh',isoValues);
[nodes,~,faces] = vol2mesh(uint8(testVolume),1:testVolumeSize(1),1:testVolumeSize(2),1:testVolumeSize(3),1.5,1.5,1,'cgalmesh',isoValues); %just usable with iso2mesh repo! http://iso2mesh.sourceforge.net/cgi-bin/index.cgi
faces = unique(faces,'rows'); %special for vol2mesh were the outer layer got an air layer which destroys the calculation
% faces(:,4) = faces(:,4) - 1; %currently non dynamic labels
% nodes(:,1:2) = nodes(:,1:2) +10;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment