Dear Nifty Users,
I have installed the Linux binaries of NiftyRec 1.6 and I am also running MatLab R2014a. When I run the demo on pages 2425 of the Software Guide, that is
N_projections = 200;
attenuation = ones(256, 256, 256);
source = zeros(N_projections, 3);
scale = ones(N_projections, 2);
trans = zeros(N_projections, 3);
rot = zeros(N_projections, 3);
source(:,2)=linspace(1,1,N_projections);
p = tt_project_ray_mex(attenuation,[512,512],source,scale,trans,rot);
for i = 1:N_projections
imagesc(p(:,:,i));
colormap gray;
pause(0.1);
end
I get:
Undefined function 'tt_project_ray_mex' for input arguments of type 'double'.
Error in demo1_nifty (line 8)
p = tt_project_ray_mex(attenuation,[512,512],source,scale,trans,rot);
Looking into the sources appear to me to suggest that the above demo could not work. Instead I try modifying it to:
N_projections = 200;
attenuation = single(ones(256, 256, 256));
volume = double(zeros(512,512));
source = double(zeros(N_projections, 3));
detpixels = int32(zeros(128,128)); % What is this? Guessing at sensible values. 32 bit unsigned?
scale_ds = double(ones(N_projections, 2)); % Detector size?
trans = double(zeros(N_projections, 3));
rot = double(zeros(N_projections, 3));
tstep = double(1.0); % What is this? Sensible value?
gpu_yes = 1;
source(:,2)=linspace(1,1,N_projections);
p = tt_project_ray_mex(attenuation,volume,source,detpixels,scale_ds,trans,rot,tstep,gpu_yes);
for i = 1:N_projections
imagesc(p(:,:,i));
colormap gray;
pause(0.1);
end
which produces
Undefined function 'tt_project_ray_mex' for input arguments of type 'int32'.
Error in demo1_nifty_2 (line 17)
p = tt_project_ray_mex(attenuation,volume,source,detpixels,scale_ds,trans,rot,tstep,gpu_yes);
I also found that after building the sources, I also got the ...type 'double' error message mentioned above. That was after I removed an error about not finding a .so file which I removed by adding to the LD_LIBRARY_PATH, which brings me to another question: why do I only have to add to LD_LIBRARY_PATH when dealing with my source build version (and not the prebuilt binary version)? Or is there a way to avoiding this every time a library is not found?
The NiftyWiki help produces an error page unfortunately so I write to this forum in the hope of some advice. Thanks in anticipation.
Markus
P.s. Other demos for (some of?) the et_ functions which did appear in the MatLab help also did not working, reporting similar problems.
