aa0fb379218f6b86818442412779930261a7d51a
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

1) function [extr voxelcount] = calculateImageData(filenameList, coordlist,gFkt)
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

2) 
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

3) %center coordinates
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

4) vox = [];
5) nCoords = size(coordlist,1);
6) for iCoord = 1:nCoords
7)    vox = [vox ; coordlist(iCoord).coord];
8) end
9) 
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

10) %maximum extracted voxels over all images
Christoph Budziszewski radius backend working

Christoph Budziszewski authored 15 years ago

11) voxelcount = 0;
Christoph Budziszewski kleine änderungen code move

Christoph Budziszewski authored 15 years ago

12) 
Christoph Budziszewski refactored to arg-structs!...

Christoph Budziszewski authored 15 years ago

13) V = filenameList;
14) nImage = numel(V);
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

15) nVoxel = nCoords;
Christoph Budziszewski refactored to arg-structs!...

Christoph Budziszewski authored 15 years ago

16) for kImage=1:nImage
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

17)     roicenter = round(inv(V(kImage).mat)*[vox, ones(nVoxel,1)]');
Christoph Budziszewski kleine änderungen code move

Christoph Budziszewski authored 15 years ago

18) 
Christoph Budziszewski radius backend working

Christoph Budziszewski authored 15 years ago

19)     subvoxelcount = 0;
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

20)     for iVoxel = 1:nVoxel
Christoph Budziszewski heavy CrossVal Toolbox deve...

Christoph Budziszewski authored 15 years ago

21) 
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

22)         %radius
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

23)         rad = coordlist(iVoxel).rad;
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

24) 
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

25)         tmp = spm_imatrix(V(kImage).mat);
26)         vdim = tmp(7:9);
27)         vxrad = ceil((rad*ones(nVoxel,3))./(ones(nVoxel,1)*vdim))';
28)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

29)         if rad==0
Christoph Budziszewski git-svn-id: https://svn.dis...

Christoph Budziszewski authored 15 years ago

30)             x = roicenter(1,iVoxel);
31)             y = roicenter(2,iVoxel);
32)             z = roicenter(3,iVoxel);
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

33)         else
34)             [x y z] = ndgrid(-vxrad(1,iVoxel):sign(vdim(1)):vxrad(1,iVoxel), ...
35)                 -vxrad(2,iVoxel):sign(vdim(2)):vxrad(2,iVoxel), ...
36)                 -vxrad(3,iVoxel):sign(vdim(3)):vxrad(3,iVoxel));
37)             sel = (x./vxrad(1,iVoxel)).^2 + (y./vxrad(2,iVoxel)).^2 + ...
38)                 (z./vxrad(3,iVoxel)).^2 <= 1;
39)             x = roicenter(1,iVoxel)+x(sel(:));
40)             y = roicenter(2,iVoxel)+y(sel(:));
41)             z = roicenter(3,iVoxel)+z(sel(:));
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

42) %             [x y z]
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

43)         end;
44) 
45)         dat = spm_sample_vol(V(kImage), x, y, z,0);
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

46)  
47)         %%Implement Spatial grouping here
48)         
49)         dat = gFkt(dat);
Christoph Budziszewski radius bug fast behoben.

Christoph Budziszewski authored 15 years ago

50)         
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

51)         % no grouping
Christoph Budziszewski radius backend working

Christoph Budziszewski authored 15 years ago

52)         for iSubVoxel = 1:size(dat,1)
53)             subvoxelcount = subvoxelcount +1;
54)             extr(kImage).dat(subvoxelcount)    = dat(iSubVoxel);
55)         end
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

56)         
Christoph Budziszewski radius backend working

Christoph Budziszewski authored 15 years ago

57)     end
58)     voxelcount = max(voxelcount,subvoxelcount);
59) end   
Christoph Budziszewski git-svn-id: https://svn.dis...

Christoph Budziszewski authored 15 years ago

60)