Blame view

matlab/hyperRaman.m 1.11 KB
2de927cb   Camille Artur   added my files, i...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  function [im]=hyperRaman(filemask)
  
      filelist = dir(filemask);
  
      %get a list of date numbers
      datenums = cell2mat({filelist.datenum});
  
      %sort the file order based on acquisition time
      [~, id] = sort(datenums);
  
      %get the number of files
      T = length(id);                 %size of the image along transverse direction X, number of steps when scanned
  
      %load the first file to determine the spectral and Y-axis size
      temp = readspe(filelist(1).name);
      L = size(temp, 1);              %size of the image along longitudinal direction Y (laser line)
      B = size(temp, 2);              %number of bands in the image
  
      %create the cube
      outvar = zeros(L, T, B);
  
      %for each line
      for x = 1:T
  
          %read a SPE file
          img = readspe(filelist(id(x)).name);
          outvar(:,x,:)= permute(img, [1 3 2]);
      end
      im=outvar;
      figure
      imagesc(outvar(:,:,150)), colorbar, axis normal, axis equal off
     
  %     subplot(1,3,1),imagesc(outvar(:,:,151)), colorbar
  %     subplot(1,3,2),imagesc(outvar(:,:,175)), colorbar
  %     subplot(1,3,3),imagesc(outvar(:,:,291)), colorbar
      colormap inferno;