Hi all
does anybody know how can I read .spe files that come out from ccd cameras by Princeton instruments and other similar?
At the moment I only found a reader for ImageJ, but if I could skip this step would be great!
Thanks
Damiano
|
|
0
|
|
|
|
Reply
|
damiano
|
1/15/2011 3:59:05 PM |
|
"damiano Genovese" <damianogeno@libero.it> wrote in message <igsg89$nue$1@fred.mathworks.com>...
> Hi all
> does anybody know how can I read .spe files that come out from ccd cameras by Princeton instruments and other similar?
> At the moment I only found a reader for ImageJ, but if I could skip this step would be great!
> Thanks
> Damiano
Maybe you had resolved the problem. There are some codes to open a spe image:
____________________________________________________
initDirectory=uigetdir('raw');
fi=initDirectory;
%filename
ff=strcat(fi,'\*.SPE');
[f1,f2 ]=uigetfile(ff,'Select the SPE-file');
ff=strcat(f2,f1);
filename=ff;
fid=fopen(filename);
Pixels=380*1024%your CCD's pixels
aw1=fread(fid,2050,'uint16');%2050=size(fread(fid,Inf,'uint16'))-Pixels
Im1=fread(fid,Pixels,'uint16');
Z=reshape(Im1,380,1024);
%there is something should be attention,
%the numbers(2050 and 380*1024) should match your spe image.
fclose(fid);
atomimage=double(Z);
imagesc(atomimage)
_______________________________________
Save the code in a M file and run it, you can get a figure.
|
|
0
|
|
|
|
Reply
|
wdwe (1)
|
5/10/2011 3:07:02 AM
|
|