|
1 |
| -using OpenMPIData |
| 1 | +using PyPlot, MPIReco, OpenMPIData |
2 | 2 |
|
3 |
| -filenameCalib = Pkg.dir("OpenMPIData","data","calibrations","3.mdf") |
4 |
| -#filenameCalib = Pkg.dir("OpenMPIData","data","calibrations","6.mdf")#High Resolution |
| 3 | +include("visualization.jl") |
| 4 | + |
| 5 | +filenameCalib = joinpath(OpenMPIData.basedir(),"data","calibrations","3.mdf") |
| 6 | +#filenameCalib = joinpath(OpenMPIData.basedir(),"data","calibrations","6.mdf")#High Resolution |
5 | 7 |
|
6 | 8 | ### Shape Phantom
|
7 |
| - phantom = "shapePhantom" |
| 9 | +# phantom = "shapePhantom" |
8 | 10 | ### Resolution Phantom
|
9 | 11 | # phantom = "resolutionPhantom"
|
10 | 12 | ### Concentration Phantom
|
11 |
| -# phantom = "concentrationPhantom" |
| 13 | + phantom = "concentrationPhantom" |
| 14 | + |
| 15 | +filenameMeas = joinpath(OpenMPIData.basedir(),"data","measurements",phantom,"3.mdf") |
12 | 16 |
|
13 |
| -filenameMeas = Pkg.dir("OpenMPIData","data","measurements",phantom,"3.mdf") |
14 | 17 |
|
| 18 | +c = reconstruction(filenameCalib, filenameMeas, iterations=3, lambd=0.001, bgCorrectionInternal=false, |
| 19 | + minFreq=80e3, SNRThresh=2.0, recChannels=1:3, frames=1:1000, nAverages=1000) |
15 | 20 |
|
16 |
| -c = reconstruction(filenameCalib, filenameMeas, iterations=3, lambda=0.001, |
17 |
| - minFreq=80e3, SNRThresh=2.0, recChannels=1:3) |
18 |
| -mkpath( Pkg.dir("OpenMPIData","data/reconstructions/$(phantom)")) |
19 |
| -s=size(c) |
| 21 | +mkpath( joinpath(OpenMPIData.basedir(),"data/reconstructions/$(phantom)")) |
| 22 | +s=size(c)[2:4] |
20 | 23 | if phantom =="shapePhantom"
|
21 |
| - filenameImage = Pkg.dir("OpenMPIData","data","reconstructions","$phantom","reconstruction3D.png") |
22 |
| - showMIPs(c[:,:,:,1],filename=filenameImage) |
| 24 | + filenameImage = joinpath(OpenMPIData.basedir(),"data","reconstructions","$phantom","reconstruction3D.png") |
| 25 | + showMIPs(c[1,:,:,:,1],filename=filenameImage) |
23 | 26 | elseif phantom =="resolutionPhantom"
|
24 | 27 | slice=[div(s[1]+1,2),div(s[2]+1,2),div(s[3]+1,2)]
|
25 |
| - filenameImage = Pkg.dir("OpenMPIData","data","reconstructions","$phantom","reconstruction3D.png") |
26 |
| - showSlices(c[:,:,:,1],slice,filename=filenameImage) |
| 28 | + filenameImage = joinpath(OpenMPIData.basedir(),"data","reconstructions","$phantom","reconstruction3D.png") |
| 29 | + showSlices(c[1,:,:,:,1],slice,filename=filenameImage) |
27 | 30 | elseif phantom =="concentrationPhantom"
|
28 | 31 | slice1=[div(s[1],3)+1,div(s[2],3)+1,div(s[3],3)+1]
|
29 | 32 | slice2=[2*div(s[1],3)+1,2*div(s[2],3)+1,2*div(s[3],3)+1]
|
30 |
| - filenameImage = Pkg.dir("OpenMPIData","data","reconstructions","$phantom","reconstruction3D_1.png") |
31 |
| - showSlices(c[:,:,:,1],slice1,filename=filenameImage,fignum=1) |
32 |
| - filenameImage = Pkg.dir("OpenMPIData","data","reconstructions","$phantom","reconstruction3D_2.png") |
33 |
| - showSlices(c[:,:,:,1],slice2,filename=filenameImage,fignum=2) |
| 33 | + filenameImage = joinpath(OpenMPIData.basedir(),"data","reconstructions","$phantom","reconstruction3D_1.png") |
| 34 | + showSlices(c[1,:,:,:,1],slice1,filename=filenameImage,fignum=1) |
| 35 | + filenameImage = joinpath(OpenMPIData.basedir(),"data","reconstructions","$phantom","reconstruction3D_2.png") |
| 36 | + showSlices(c[1,:,:,:,1],slice2,filename=filenameImage,fignum=2) |
34 | 37 | end
|
0 commit comments