Wednesday, 24 June 2015

Modification of code to include falx cerebri appears reasonably successful based on simulations.
Non-smoothed data in movie looks potentially closer to being biologically realistic.

Falx code:

Lines 135-142
%FALX HERE!!!!! set of zeroes.
% add in falx cerebri here!!
front=meshgrid(48:49,68:100,0:60);
top=meshgrid(48:49,38:68,34:60);
back=meshgrid(48:49,0:38,0:60);
Dom(front) = 0;
Dom(top) = 0;
Dom(back) = 0;

Adjusting the anatomical boundary 25/06/15


Current plans and work:

One major issue that needs to be fixed is the lack of an anatomical boundry at the Falx Cerebri, which is a structure that the tumour cannot spread through as it is the reflection of the meninges between the two hemispheres and essentially a wall of connective tissue separating the left and right hemisphere apart from at the corpus callosum.  I experimented with adding in a set of points to the variable Dom, which is the brain mask set, I had promising initial results and will upload the code adjustment, check the boundary again in MRTrix and re-run some simulations.

I wrote a 2-D test code for the anisotropy measure which needs to be extended to 3D and applied to the brain data.   Before this I will examine the isocaps code and see what different isosurfaces look like and how much brain tissue they extend through.  I think looking at isocontours or isocaps superimposed on the MRI data would be a nice visualisation technique which I will work on too. 

In short:

1. Fix Domain problems re falx
2. Examine  isosurfaces
3. produce anisotropy measure.



 

 

 

 

Sunday, 14 June 2015

Three D movies and meeting with Dr Yonghui Li

15/06/15

Meeting today with Dr Yongui Li (y.li17@uq.edu.au) at Queensland Brain Institute was very productive, he is interested in helping us with the tractography and imaging software side of things.  He has concerns about moving from human to mouse models as the imaging software and technical details can be tricky, but is well established there between CAI and QBI.

He has taken my data set to do tractography on and spoke to me about the care needed to do each step before you can look at the output effectively.  Still remains to be seen how we would visualise things when we have the tumour, I may email Robert Smith at the Florey Institute again to get his advice, as he seems to think it is possible, maybe converting to a Nifti file to then view in MRTrix?

Modified my 3D visualisation code using the isocaps function in MATLAB to produce movies at some differing anisotropies.  I will collect slice sequences tomorrow too.  On visual inspection, you can see some time points where the surface definitely appears more anisotropic.

 Rf01
Rf10

rf15

rf30

rf60 

Tuesday, 9 June 2015

Created 4D tumour matrix from cstore using a for loop

for i = 1:200
Tumour(:,:,:,i) = cstore{i}

now to convert this data to a useable form such as nifti and see if I can view it in mrtrix or just look at it directly in MATLAB which might be slow.

Looked at imagesc view of tumour with brain overlay, looks more realistic.  Reshaped it into a strange rectangle though.


Monday, 8 June 2015

3D visualisation in MATLAB




3D visualisation techniques
Following the MATLAB documentation for 3D visualisation, I created the following script to visualise their sample MRI data:
%3D visualisation of MRI images
%From document visualize.pdf
load mri
D = squeeze(D); %gets rid of the redundant 4th dimension which was time = 1
figure
colormap(map)
image_num = 8;
image(D(:,:,image_num)) %shows z slice 'image_num'
axis image 
x = xlim;
y = ylim;
cm = brighten(jet(length(map)),-.5); %reduces brightness by 50%
figure
colormap(cm)
contourslice(D,[],[],image_num)
axis ij
xlim(x)
ylim(y)
daspect([1,1,1])
figure
colormap(cm)
contourslice(D,[],[],[1,12,19,27],8); %displays four contours 1,12,19,27 in 3D
view(3);
axis tight
%Applying isosurfaces to 3D data
figure
colormap(map)
Ds = smooth3(D); %using smoothing function to smooth data
hiso = patch(isosurface(Ds,5),...
    'FaceColor',[1,.75,.65],...
    'EdgeColor','none');...
    isonormals(Ds,hiso) %renders the isosurface using vertex normals obtained
                        %from the smoothed data
%Adding Isocaps to Show Cut-Away Surface
hcap = patch(isocaps(D,5),'FaceColor','interp','EdgeColor','none');
%Defining the View
view(35,30)
axis tight
daspect([1,1,.4])
%Add lighting
lightangle(45,30);
lighting gouraud
hcap.AmbientStrength = 0.6;
hiso.SpecularColorReflectance = 0;
hiso.SpecularExponenet = 50;

This outputted the following images:
Standard MRI slice

Contour Slice



Four contour slices stacked 
Isosurface
Isocaps function to show head with slice where MRI data is

Now will use this function  to plot concentration matrix and diffusion tensor with isosurface of head from original scan.

  1. Plan/Potential issues: Will need to register diffusion scan from which we derived the original diffusion tensor and brain mask to create head isosurface.  Tjis should not be too much of a problem as the box dimension will be the same.  
  2. Future higher definition work may need a T1 scan we can register with a 64 direction diffusion scan so have a high res anatomical scan and a diffusion data set we can derive a diffusion tensor for the tumour model and also has enough data to overlay tractography.




 

Contour plot and isocaps view of tumour.  Not properly orientated and sans brain and skuil.

Saturday, 6 June 2015

Images and videos for varying anisotropies 1, 10, 30 using a scaled ImageSC command [0 2.5e5]







Tumour slice series, r-factor 01 (anisotropy = water).








 Tumour Series for r factor 10, as Jbabdi et al, 10x water diffusion coefficient.








Slice series for r-factor 30.



07/06/2015.
 Tasks for week ahead:
  1. Make a movie of tumour growth using imageSc scaled properly.
  2. Establish a way of extracting the brain and skull(do not think it's in the DICOMs actually) outlines for 2D and 3D images.  Look at isocaps command in MATLAB.
  3. Write code for new anisotropy measure using the discrete gradient measure.
  4. Investigate anatomical boundaries for tumour growth in our code, may need to add in the Falx, if not automatically segmented via FSL brain mask, we could do this manually as a centreline of zero flux with the coordinates of the corpus calossum being the only connection of the two hemispheres as is anatomically realistic.

Task 01: animations
Animation for rf01
Animation for rf10
Animation for rf30

Tuesday, 2 June 2015







Image using imagesc with no brain registration, just the tumour. anisotropy = 1 (same as water), D mean 1.5x10^-7, rho = 4









Same plot technique, same location, anisotropy (r factor) = 10

Note different shapes of initial tumour especially.

N.b.  Question needs answering, is the falx cerebri counted as an anatomical boundary in the brain mask. as it should be!