Skip to content
Snippets Groups Projects
Commit b578210b authored by Yoann Guilhem's avatar Yoann Guilhem Committed by Nicola Vigano
Browse files

Get rid of some id19 functions, import the others

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@794 4c865b51-4357-4376-afb4-474e03ccb993
parent 462f41e6
No related branches found
No related tags found
No related merge requests found
...@@ -47,11 +47,11 @@ if isfield(acq,'scantype') ...@@ -47,11 +47,11 @@ if isfield(acq,'scantype')
scanrange=180; scanrange=180;
end end
elseif isfield(acq,'type') elseif isfield(acq,'type')
if strcmp(acq.type,'360degree') || strcmp(acq.type,'360') if strcmp(acq.type,'360degree') || strcmp(acq.type,'360')
scanrange=360; scanrange=360;
else else
scanrange=180; scanrange=180;
end end
else else
disp('can not read scan range'); disp('can not read scan range');
return; return;
...@@ -71,14 +71,13 @@ if ~isfield(acq,'interlaced_turns') || acq.interlaced_turns==0 ...@@ -71,14 +71,13 @@ if ~isfield(acq,'interlaced_turns') || acq.interlaced_turns==0
par.last=num2str(acq.nproj-1); par.last=num2str(acq.nproj-1);
par.prefix=sprintf('%s/1_preprocessing/abs/abs',acq.dir); par.prefix=sprintf('%s/1_preprocessing/abs/abs',acq.dir);
par.angle_between_projections=num2str(scanrange/2/acq.nproj); %quick fix (2*acq.nproj) wolfgang 04/2008 par.angle_between_projections=num2str(scanrange/2/acq.nproj); %quick fix (2*acq.nproj) wolfgang 04/2008
else if acq.interlaced_turns==1 elseif acq.interlaced_turns==1
par.last=num2str((acq.interlaced_turns+1)*acq.nproj-1); par.last=num2str((acq.interlaced_turns+1)*acq.nproj-1);
par.prefix=sprintf('%s/1_preprocessing/abs/abs_renumbered',acq.dir); par.prefix=sprintf('%s/1_preprocessing/abs/abs_renumbered',acq.dir);
par.angle_between_projections=num2str(scanrange/((acq.interlaced_turns+1)*acq.nproj)) par.angle_between_projections=num2str(scanrange/((acq.interlaced_turns+1)*acq.nproj));
else else
disp('to be adjsuted') disp('to be adjusted');
return return;
end
end end
% fin modif sabine % fin modif sabine
par.image_pixel_size_1=num2str(acq.pixelsize); par.image_pixel_size_1=num2str(acq.pixelsize);
...@@ -93,4 +92,6 @@ par.end_voxel_2=num2str(acq.bb(3)); ...@@ -93,4 +92,6 @@ par.end_voxel_2=num2str(acq.bb(3));
par.end_voxel_3=num2str(acq.bb(4)); par.end_voxel_3=num2str(acq.bb(4));
par.output_file=sprintf('%s/%s.vol',acq.dir,acq.name); par.output_file=sprintf('%s/%s.vol',acq.dir,acq.name);
par_write(par); par.zeroclipvalue = acq.zeroclipvalue;
\ No newline at end of file
gtHSTParamWriter(par);
...@@ -134,6 +134,7 @@ function initialise_gt(ignore_id19) ...@@ -134,6 +134,7 @@ function initialise_gt(ignore_id19)
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_GVF')); addpath(fullfile(GT_MATLAB_HOME, 'zUtil_GVF'));
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Help')); addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Help'));
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_ICP')); addpath(fullfile(GT_MATLAB_HOME, 'zUtil_ICP'));
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_ID19'));
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Imaging')); addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Imaging'));
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Imaging', 'pmedf')); addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Imaging', 'pmedf'));
addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Indexter')); addpath(fullfile(GT_MATLAB_HOME, 'zUtil_Indexter'));
......
...@@ -12,8 +12,8 @@ distortion=distortion_read('shifts_12_sfit56.dat'); ...@@ -12,8 +12,8 @@ distortion=distortion_read('shifts_12_sfit56.dat');
% distortion.y = horizontal (!!) displacement field % distortion.y = horizontal (!!) displacement field
% read your weird EDFs here % read your weird EDFs here
im=edfread('holeX_corrected_Z0.edf'); im=edf_read('holeX_corrected_Z0.edf');
im=im';
% correct them like this (image and distortion maps have to be of the same type!) % correct them like this (image and distortion maps have to be of the same type!)
turns = 50 turns = 50
......
% function c=correlate(z1,z2,varargin)
%
% looks for the maximum correlation between z1 and z2
%
% c=correlate(z1,z2,flag)
% flag should be zero if z1 and z2 are in real (default) space
% one reciprocal
%
% c=correlate(z1,z2,flag,size_part)
% limits de maximum displacement to a given value (default: no limit)
%
% uses fourier transformation to calculate the cross-correlation between z1 and z2
% searches the maximum trough interpolation between the pixels
% max is max of parabol through 9 points around the abs. max
% result is c=[row column]
% z2 should go column columns to the right (or z1 column columns to the left)
% z2 should go row rows down (or z1 row rows up)
% to compensate drift: interpolate(z2,row,column)
%
% see also INTERPOLATE, TRANSLATE
%
% origin: peter
function c=correlate(z1,z2,varargin)
switch nargin
case 2
flag=0;
part=0;
case 3
flag=varargin{1};
part=0;
case 5
flag=varargin{1};
if isempty(flag)
flag=0;
end
part=1;
part_pos = varargin{2};
part_size = varargin{3};
end
[n m]=size(z1);
if flag
% matrices are fft'ed
cc=abs(ifft2(z1.*conj(z2)));
else
% matrices are not fft'ed
cc=abs(ifft2(fft2(z1).*conj(fft2(z2))));
end %if
if part
part_pos=round(part_pos);
if (length(part_size)==1)
part_size(2) = part_size(1);
end
w=zeros(size(z1));
% w([n-part_size:n 1:1+part_size],[m-part_size:m 1:1+part_size])=1;
w(mod(-part_size(1)+part_pos(1):part_size(1)+part_pos(1),n)+1,mod(-part_size(2)+part_pos(2):part_size(2)+part_pos(2),m)+1)=1;
cc=cc.*w-1e20.*(1-w);
end
[a,b]=max(cc);
[d,c(2)]=max(a);
c(1)=b(c(2));
c=c+min2par(cc([mod(c(1)-2,n)+1 c(1) mod(c(1),n)+1],[mod(c(2)-2,m)+1 c(2) mod(c(2),m)+1]));
c=rem(c+ceil([n/2 m/2])-[2 2],[n m])-ceil([n/2 m/2])+[1 1];
% subfunctions
%-------------------------
function mi=min2par(arg)
[X,Y]=meshgrid(-1:1,-1:1);
r=Y(:);
c=X(:);
xt=quad2func(r,c);
a=xt\arg(:);
mi=[-a(2) -a(3)]/[2*a(5) a(4);a(4) 2*a(6)];
%-------------------------
% function xt=quad2func(x,y)
% quadratic function of 2 parameters x and y
% size(xt)=[n 6] with n the number of observations
% for functions linear in the parameters:
% z = xt*a with size(a)=[6 1]
% i.e. z=a(1)+a(2)*x+a(3)*y+a(4)*x.*y+a(5)*x.^2+a(6)*y.^2
% if one has n observations given by z (size(z)=[n 1])
% the least squares estimation of a is
% a=xt\z;
function xt=quad2func(x,y)
xt=[ones(size(x)) x y x.*y x.^2 y.^2];
% function c=correlate1(z1,z2)
% looks for the shift giving maximum correlation between (column) vectors z1 and z2
% uses Fourier transformation to calculate the cross-correlation between z1 and z2
% searches the maximum trough interpolation between the pixels
% uses parabolic fit around the absolute maximum
% result is c
% z2 should go c rows down (or z1 c rows up)
% to correct use interpolate1(f)(z2,c)
% if z1 and z2 are matrices the correlation is determined between the corresponding columns
%
% may not work for very short vectors (length 3 and so on)
% length of the vectors should be even
%
% assumes that the shift is less then half the number of rows of z1
% returns NaN if not successful for a given row
%
% origin: peter
%
% see also INTERPOLATE1, CORRELATE
function c=correlate1(z1,z2)
[n,m]=size(z1);
% m is the number of columns in z1 (and z2)
% n is the number of rows in z1
if rem(n,2)
disp('Please use an even number of rows in correlate1!')
return
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% Calculation of cross-correlation function %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cc=abs(ifft(fft(z1).*conj(fft(z2))));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% Determination maximum of cc function %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% starting from absolute maximum
[a,c]=max(cc);
% translation of the zero displacement to the center of the vector because this is where the maximum will be
% to avoid to look at start and end of the vector
c=rem(c+n/2-1,n)+1;
cc=roll(cc,n/2,0);
% parabolic fit using w points around the maximum to go sub-pixel
w=3;
wb=floor((w-1)/2);
we=ceil((w-1)/2);
xt=quadfunc((1:w)');
xt2=xt'*xt;
for k=1:m
if (c(k)-wb<1)|(c(k)+we>n)
disp(sprintf('Correlation was not successful for row %d',m))
c(k)=NaN;
else
a=xt2\(xt'*cc(c(k)-wb:c(k)+we,k));
c(k)=c(k)+(-a(2)/2/a(3));
end
end
% correction for translation made
c=c-n/2-2-wb;
function findshifts2(varargin);
% function shift=findshifts(im1,im2)
% allows to to determine visually the relative shift between two images
% KEYS:
% arrows (cursor keys) - one pixel shift
% shift-arrows - ten pixel shift
% 1 (2) - increase (decrease) image contrast
% 3 (4) - increase (decrease) image brightness
%
% press t to toggle between images
% press s to return to to image subtraction mode
% press z to select graphically a region of interest (4 times oversampling)
% press r to return to full image')
% press enter to accept current value')
%
% OTHER STARTUP OPTIONS
% findshifts2(im1,im1,parameter,value)
% where parameter and value pairs can be:
% 'roix',[minimum maximum] - set the horizontal region of interest
% 'roiy',[minimum maximum] - vertical ROI
% 'clims',[minimum maximum] - preset the colour limits
% 'precorrelate','yes' - attempt to correlate the images before
% interaction
% origin: Wolfgang 12/05
warning('off','Images:initSize:adjustingMag');
%% startup
app=[];
app.view.h=figure; % create a new figure
app.mode='subtract';
app.togglestate=true;
app.vshift=0;
app.hshift=0;
app.voffset=0;
app.hoffset=0;
app.rot=0;
app.zoom=1;
app.view.h=gcf;
app.clims=[-0.1 0.1];
app.climt=[0 1];
app.clima=[0 2];
app.im0=varargin{1};
app.im1=varargin{2};
app.im1nr=app.im1;
app.roix=[1 size(app.im0,2)];
app.roiy=[1 size(app.im0,1)];
app.precorrelate='off';
app.block='off';
app.quit=0;
app.firsttime=true;
if nargin>2
if iscell(varargin{3})
app=parse_pv_pairs(app,varargin{3});
else
app=parse_pv_pairs(app,{varargin{3:end}});
end
end
% precrop the image
app.im0=app.im0(app.roiy(1):app.roiy(2),app.roix(1):app.roix(2));
app.im1=app.im1(app.roiy(1):app.roiy(2),app.roix(1):app.roix(2));
% then pre-correlate if requested
if strcmpi(app.precorrelate,'yes') || strcmpi(app.precorrelate,'on')
fprintf('Pre-correlating images\n')
tmp=correlate(app.im0,app.im1);
app.voffset = tmp(1);app.hoffset=tmp(2);
end
set(app.view.h,'KeyPressFcn',@sfKeyPress)
% help(mfilename)
iptsetpref('imtoolinitialmagnification','fit')
sfUpdateFigure;
if strcmp(app.block,'on')
% if user wants nothing to return until findshift is finished
while 1
drawnow
if app.quit==1
break
end
end
end
function sfKeyPress(varargin)
c=varargin{2};
switch c.Key
case 'uparrow'
if strcmp(c.Modifier,'shift')
app.vshift=app.vshift+10/app.zoom;
else
app.vshift=app.vshift+1/app.zoom;
end
sfUpdateFigure;
case 'downarrow'
if strcmp(c.Modifier,'shift')
app.vshift=app.vshift-10/app.zoom;
else
app.vshift=app.vshift-1/app.zoom;
end
sfUpdateFigure;
case 'rightarrow'
if ~isempty(c.Modifier)
if strcmp(c.Modifier,'shift')
app.hshift=app.hshift+10/app.zoom;
elseif strcmp(c.Modifier,'control')
app.rot=app.rot+1;
app.im1=imrotate(app.im1nr,app.rot,'bicubic','crop');
elseif strcmp(c.Modifier,{'shift' 'control'})
app.rot=app.rot+0.1;
app.im1=imrotate(app.im1nr,app.rot,'bicubic','crop');
end
else
app.hshift=app.hshift+1/app.zoom;
end
sfUpdateFigure;
case 'leftarrow'
if ~isempty(c.Modifier)
if strcmp(c.Modifier,'shift')
app.hshift=app.hshift-10/app.zoom;
elseif strcmp(c.Modifier,'control')
app.rot=app.rot-1;
app.im1=imrotate(app.im1nr,app.rot,'bicubic','crop');
elseif strcmp(c.Modifier,{'shift' 'control'})
app.rot=app.rot-0.1;
app.im1=imrotate(app.im1nr,app.rot,'bicubic','crop');
end
else
app.hshift=app.hshift-1/app.zoom;
end
sfUpdateFigure;
case 'return'
%exit interactive mode and return current shift
set(app.view.h,'KeyPressFcn','');
assignin('base','shift',[app.vshift+app.voffset app.hshift+app.hoffset app.rot]);
fprintf('Shift is: [%.2fv %.2fh]\n',app.vshift+app.voffset,app.hshift+app.hoffset);
app.quit=1;
return;
case 'a'
disp('changing to adding mode');
app.mode='add';
sfUpdateFigure;
case '1'
disp('Increasing contrast')
switch app.mode
case 'subtract'
app.clims=app.clims*0.9;
disp(sprintf('clim is %f %f',app.clims(1),app.clims(2)));
case 'toggle'
app.climt=app.climt*0.95;
disp(sprintf('clim is %f %f',app.climt(1),app.climt(2)));
case 'add'
app.clima=app.clima*0.9;
disp(sprintf('clim is %f %f',app.clima(1),app.clima(2)));
end
sfUpdateFigure;
case '2'
disp('Decreasing contrast')
switch app.mode
case 'subtract'
app.clims=app.clims*1.1;
disp(sprintf('clim is %f %f',app.clims(1),app.clims(2)));
case 'toggle'
app.climt=app.climt*1.05;
disp(sprintf('clim is %f %f',app.climt(1),app.climt(2)));
case 'add'
app.clima=app.clima*1.1;
disp(sprintf('clim is %f %f',app.clima(1),app.clima(2)));
end
sfUpdateFigure;
case '3'
disp('Colormap brighter')
switch app.mode
case 'subtract'
app.clims=app.clims-max(app.clims)*0.1;
disp(sprintf('clim is %f %f',app.clims(1),app.clims(2)));
case 'toggle'
app.climt=app.climt-mean(app.climt)*0.05;
disp(sprintf('clim is %f %f',app.climt(1),app.climt(2)));
case 'add'
app.clima=app.clima-mean(app.clima)*0.1;
disp(sprintf('clim is %f %f',app.clima(1),app.clima(2)));
end
sfUpdateFigure;
case '4'
disp('Colormap darker')
switch app.mode
case 'subtract'
app.clims=app.clims+max(app.clims)*0.1;
disp(sprintf('clim is %f %f',app.clims(1),app.clims(2)));
case 'toggle'
app.climt=app.climt+mean(app.climt)*0.05;
disp(sprintf('clim is %f %f',app.climt(1),app.climt(2)));
case 'add'
app.clima=app.clima+mean(app.clima)*0.1;
disp(sprintf('clim is %f %f',app.clima(1),app.clima(2)));
end
sfUpdateFigure;
case 's'
disp('changing to subtraction mode');
app.mode='subtract';
app.clim=app.clims;
sfUpdateFigure;
case 'z'
disp('Select region of interest');
title('Select region of interest');
[toto,r]=imcrop;
disp('Zooming...')
title('Zooming...')
r=round(r);
sfZoom(r)
sfUpdateFigure;
case 'r'
disp('reset full image');
app.zoom=1;
app.im0=app.orig0;
app.im1=app.orig1;
app.vshift=round(app.vshift+app.voffset);
app.hshift=round(app.hshift+app.hoffset);
app.voffset=0;
app.hoffset=0;
sfUpdateFigure;
case 't'
app.mode='toggle';
app.togglestate= not(app.togglestate);
app.clim=app.climt;
sfUpdateFigure;
case 'h'
help(mfilename)
end
end
function sfZoom(roi)
app.orig0=app.im0;
app.orig1=app.im1;
app.zoom=4;
app.im0=imresize(imcrop(app.im0,roi),4,'bicubic');
app.im1=imresize(imcrop(app.im1,[roi(1)-app.hshift,roi(2)-app.vshift,roi(3),roi(4)]),4,'bicubic');
app.voffset=app.vshift;
app.hoffset=app.hshift;
app.vshift=0;
app.hshift=0;
end
function sfUpdateFigure
colormap gray;
im_tmp=roll(app.im1,app.vshift*app.zoom,app.hshift*app.zoom);
switch app.mode
case 'add'
imshow(app.im0+im_tmp,app.clima);
title(sprintf('vertical shift: %.2f\t horizontal shift: %.2f',app.vshift+app.voffset,app.hshift+app.hoffset));
case 'subtract'
%imagesc(app.im0-im_tmp,app.clims);
if app.firsttime
app.h_im=imshow(app.im0-im_tmp,app.clims);
%app.firsttime=false;
else
set(app.h_im,'cdata',app.im0-im_tmp)
set(get(app.h_im,'parent'),'clim',app.clims);
end
% keyboard
% axis image
title(sprintf('vertical shift: %.2f\t horizontal shift: %.2f',app.vshift+app.voffset,app.hshift+app.hoffset));
case 'toggle'
if app.togglestate == true
imagesc(app.im0,app.climt);
axis image
title('first image (fixed position)');
else
imagesc(im_tmp,app.climt);
axis image
title(sprintf('second image: vertical shift: %.2f\t horizontal shift: %.2f, rotation: %.2f',app.vshift+app.voffset,app.hshift+app.hoffset,app.rot));
end
end
drawnow
end
end
% function [y,f]=fwhm(cc,c)
% looks for the maximum around the position given by c
% y corresponds to position of maximum
% f corresponds to fwhm (no background)
% m corresponds to the maximum (parabolic fit)
%
function [y,f,m]=fwhm(cc,varargin)
switch nargin
case 1
[m,c]=max(cc);
case 2
c=varargin{1};
end
w=3;
wb=floor((w-1)/2);
we=ceil((w-1)/2);
xt=quadfunc((1:w)');
xt2=xt'*xt;
a=xt2\(xt'*cc(c-wb:c+we));
y=c+(-a(2)/2/a(3))-wb-1;
m=(a(1)-a(2)^2/4/a(3))/2;
% looking for left crossing of half of maximum
index=floor(y);
while cc(index)>m
index=index-1;
end
yl=index+(m-cc(index))/(cc(index+1)-cc(index));
% looking for right crossing of half of maximum
index=ceil(y);
while cc(index)>m
index=index+1;
end
yr=index-(m-cc(index))/(cc(index-1)-cc(index));
f=yr-yl;
m=2*m;
% function r=interpolate1f(p,r,c)
% interpolates each column of p according to the translation-fault given by fault (column vector)
% a positive fault corresponds to translating down the column
% method for interpolation is Fourier-transformation
% supposes periodic signals for the edges
function r=interpolatef(p,r,c)
[n m]=size(p);
r=real(ifft2(fft2(p).*translate(r,c,n,m)));
% function x=quadfunc(arg)
% used by correlate1, ...
% for implementing parabolic fit
% returns x=[ones(length(arg),1) arg arg.^2];
% origin: peter
function x=quadfunc(arg)
x=[ones(length(arg),1) arg arg.^2];
% function rm=roll(matrix,r,c)
% cycles a matrix (or vector) r rows down and c columns to the right
% rm(i,j)=rm(i-r,j-c)
% origin: peter
function rm=roll(matrix,r,c)
[n,m]=size(matrix);
if r>0
rm=[matrix(n-r+1:n,:) ; matrix(1:n-r,:)];
elseif r<0
rm=[matrix(1-r:n,:) ; matrix(1:-r,:)];
else
rm=matrix;
end
if c>0
rm=[rm(:,m-c+1:m) rm(:,1:m-c)];
elseif c<0
rm=[rm(:,1-c:m) rm(:,1:-c)];
end
% function t=translate(r,c,n,m)
% creates matrix for interpolation using Fourier-transformation
% r: translation in the direction of the rows, positive is down
% c: translation in the direction of the columns, positive is to the right
% n: number of rows in the resulting matrix
% m: number of columns in the resulting matrix
% if an image im(x1,x2) must be translated of r and c in direction x1 and x2
% one can use:
% fft2( im(x1-r,x2-c) ) = translate(r,c,n,m) .* fft2( im(x1,x2) )
% or
% im(x1-r,x2-c) = real( ifft2( translate(r,c,n,m) .* fft2( im(x1,x2) ) )
% real is to avoid a small imaginary part in the result (only for real images)
% origin: peter
function t=translate(r,c,n,m)
f=r*2*pi/n*(0:floor(n/2))';
f=cos(f)-i*sin(f);
%f=exp(-i*f);
f=repmat([f;flipud(conj(f(2:ceil(n/2))))],1,m);
g=c*2*pi/m*(0:floor(m/2));
g=cos(g)-i*sin(g);
%g=exp(-i*g);
g=repmat([g fliplr(conj(g(2:ceil(m/2))))],n,1);
t=f.*g;
function parts=utilExtractFilenameParts(fname)
% UTILEXTRACTFILENAMEPARTS.M
% Given a filename, extracts the prefix, index, and extension
% Greg Johnson, May 2006
%
% Bugs: only deals with files having four or five digits in the number
% see fileparts for a more general purpose tool
% used to have . after \w*).
pattern='(?<prefix>\w*)(?<index>\d{4,5}+).(?<extension>\w*)';
parts=regexp(fname,pattern,'names');
try
parts.index=str2num(parts.index);
catch
end
function [fnameroot,fnameformatstring,fnameextension]=utilStripExtensionandFormat(full_fname)
% removes, if necessary, the .edf extension of a file name
if strcmpi(full_fname(end-3:end),'.edf')
fname=full_fname(1:end-4);
else
fname=full_fname;
end
[fnameroot,fnameformatstring]=sfStripFormatting(fname);
fnameextension='.edf';
end
function [root,fmt]=sfStripFormatting(fname)
% removes, if it can, any formatting at the end of the fname (%04d, for example)
ndx=find(fname=='%');
if ndx
root=fname(1:ndx-1);
fmt=fname(ndx:end);
else
root=fname;
fmt='';
end
end
...@@ -116,7 +116,9 @@ if isfield(par, 'prefix') ...@@ -116,7 +116,9 @@ if isfield(par, 'prefix')
fprintf(fid, 'DO_AXIS_CORRECTION = %s # Axis correction\n', par.correct_axis); fprintf(fid, 'DO_AXIS_CORRECTION = %s # Axis correction\n', par.correct_axis);
fprintf(fid, 'AXIS_CORRECTION_FILE = %s\n', par.correct_axis_file); fprintf(fid, 'AXIS_CORRECTION_FILE = %s\n', par.correct_axis_file);
fprintf(fid, 'OPTIONS= { ''padding'':''%s'' , ''axis_to_the_center'':''%s''} # Padding and position axis\n', par.padding, par.axis_to_the_center); fprintf(fid, 'OPTIONS= { ''padding'':''%s'' , ''axis_to_the_center'':''%s''} # Padding and position axis\n', par.padding, par.axis_to_the_center);
fprintf(fid, 'ZEROCLIPVALUE = %s # Minimum value of radiographs after flat / before log\n', par.zeroclipvalue); if isfield(par, 'zeroclipvalue')
fprintf(fid, 'ZEROCLIPVALUE = %s # Minimum value of radiographs after flat / before log\n', par.zeroclipvalue);
end
fprintf(fid, '\n# Parameters defining output file / format\n'); fprintf(fid, '\n# Parameters defining output file / format\n');
fprintf(fid, 'OUTPUT_FILE = %s\n', par.output_file); fprintf(fid, 'OUTPUT_FILE = %s\n', par.output_file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment