Task #10260 (new)
Opened 11 years ago
Last modified 8 years ago
XML modulo annotation creation LaVision
Reported by: | jburel | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Unscheduled |
Component: | General | Version: | n.a. |
Keywords: | n.a. | Cc: | ajpatterson, i.munro@… |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
Code from frontEnd/helper functions/load_flim_file
`
if strcmp(fname(end-3:end),'.ome')
info = imfinfo(file);
n_im = length(info);
sz = [n_im info(1).Height info(1).Width];
im_data = zeros(sz);
% get binSpacing from file header
tT = Tiff(file);
s = tT.getTag('ImageDescription?');
pos = strfind(s,'PhysicalSizeZ');
binSpacing = 1000 .* str2double(s(pos+15:pos+20)); %binSpacing in ps
delays = (0:(n_im - 1)) .* binSpacing;
for i=1:n_im
im_data(i,:,:) = imread(file,'Index',i,'Info',info);
end
`
The ' delays' array here would go into Labels in your Modulo Annotation with units= ps.
You need to be careful with units though.
We assume ns for the units (& then multtiply by 1000 to covert to ps for our use when we calculate binSpacing) but the units are in the xml as well, in the customAttributes that you sent
under FirstAxis?-Unit="ns".
Probably best to calculate the labels in ns & retain the units .
Change History (2)
comment:1 Changed 8 years ago by jamoore
comment:2 Changed 8 years ago by jamoore
Referencing ticket #7855 has changed sprint.
Referencing ticket #7855 has changed sprint.