% geometry
g = py.SimpleRTK.ThreeDCircularProjectionGeometry();
for i=0:359,
    g.AddProjection(500,1000,i);
end

% what projects
cube1 = zeros(128,128,128);
cube = single(cube1);

cube(17:112,17:112,17:112) = 1;
cube(33:96,33:96,33:96) = 0;

data_size = size(cube);
result = py.numpy.reshape(cube(:)', int32(fliplr(size(cube))));
volume = py.SimpleRTK.GetImageFromArray(result.astype(py.numpy.float32));
volume.SetSpacing(py.list([1,1,1]));
volume.SetOrigin(py.list([-64.5,-64.5,-64.5]));

% projections
 
const2 = py.SimpleRTK.ConstantImageSource();
const2.SetSpacing(py.list([1,1,1]));
const2.SetSize(py.list(int32([512,1,360])));
const2.SetOrigin(py.list([-255.5,0,0]));
proj = const2.Execute();

% forward

forward = py.SimpleRTK.JosephForwardProjectionImageFilter();
forward.SetGeometry(g);
proj = forward.Execute(proj, volume);
