-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
363 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,19 @@ | ||
function modPoint = transModPoint(obj, modPoint, varargin) | ||
function modPoint = transModPoint(obj, modPoint) | ||
% l stands for layer. | ||
% Variation is now controled by SMAP as linkage error | ||
|
||
p = inputParser; | ||
p.addParameter('lPars',[]); | ||
p.parse(varargin{:}); | ||
p = p.Results; | ||
%% Transform the model | ||
if isempty(p.lPars) | ||
lPars = obj.exportPars(1,'lPar'); | ||
else | ||
lPars = p.lPars; | ||
end | ||
if iscell(modPoint) | ||
for l = 1:obj.numOfLayer | ||
modPoint_.xnm = modPoint{l}.x; modPoint_.ynm = modPoint{l}.y; | ||
if isfield(modPoint{l}, 'z') | ||
modPoint_.znm = modPoint{l}.z; | ||
end | ||
modPoint_ = obj.locsHandler(modPoint_, lPars,0,'usedformalism', 'rotationMatrixRev','order_transform','RT'); | ||
|
||
modPoint{l}.x = modPoint_.xnm; modPoint{l}.y = modPoint_.ynm; | ||
if isfield(modPoint{l}, 'z') | ||
modPoint{l}.z = modPoint_.znm; | ||
end | ||
end | ||
else | ||
modPoint_.xnm = modPoint.x; modPoint_.ynm = modPoint.y; | ||
if isfield(modPoint, 'z') | ||
modPoint_.znm = modPoint.z; | ||
lPar = obj.exportPars(1,'lPar'); | ||
for l = 1:obj.numOfLayer | ||
modPoint_.xnm = modPoint{l}.x; modPoint_.ynm = modPoint{l}.y; | ||
if isfield(modPoint{l}, 'z') | ||
modPoint_.znm = modPoint{l}.z; | ||
end | ||
modPoint_ = obj.locsHandler(modPoint_, lPars,0,'usedformalism', 'rotationMatrixRev','order_transform','RT'); | ||
modPoint_ = obj.locsHandler(modPoint_, lPar,0,'usedformalism', 'rotationMatrixRev','order_transform','RT'); | ||
|
||
modPoint.x = modPoint_.xnm; modPoint.y = modPoint_.ynm; | ||
if isfield(modPoint, 'z') | ||
modPoint.z = modPoint_.znm; | ||
modPoint{l}.x = modPoint_.xnm; modPoint{l}.y = modPoint_.ynm; | ||
if isfield(modPoint{l}, 'z') | ||
modPoint{l}.z = modPoint_.znm; | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function z0focus=getfocusPSF(PSF) | ||
for k=1:length(PSF) | ||
[P,CRLB, LL] =mleFit_LM(PSF{k}*10000,4,100,1,0,1); | ||
sx=P(:,5); | ||
sy=P(:,6); | ||
dsx=sx-sy; | ||
[v,ind(k)]=min(dsx.^2); | ||
end | ||
z0focus=round(mean(ind)); | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
SMAP %you need to start SMAP to add directories and set some variables | ||
smapobject=g; | ||
|
||
%main batch file: | ||
batchfile='/Volumes/Ries_Data/DataSSD/workingdirectory/GlobalFitPaper/Exampledata/NPC4C/191022_beads/003_beads_10nm_3D_2c_e_676_685_Z-stack_1_batch.mat'; | ||
%list of data files: | ||
rawfiles={'/Volumes/Ries_Data/DataSSD/workingdirectory/GlobalFitPaper/Exampledata/NPC4C/191022_beads/001_beads_10nm_3D_2c_e_676_685_Z-stack_1/001_beads_10nm_3D_2c_e_676_685_Z-stack_1_MMStack_Pos0.ome.tif'}; | ||
|
||
%make batch processor programmatically | ||
bp=WorkflowModules.Batchprocessor; | ||
bp.attachPar(smapobject.P) | ||
bp.makeGui; | ||
bp.guihandles.mainbatchfile.String=batchfile; | ||
bp.guihandles.filelist.String=rawfiles; | ||
bp.guihandles.filelist.Value=1; | ||
|
||
%run batch processor: | ||
bp.processb_callback(0,0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,17 +30,17 @@ | |
function pard=guidef(obj) | ||
pard=guidef(obj); | ||
end | ||
function initGui(obj) | ||
[email protected](obj); | ||
obj.jsonfile=obj.jsondefault; | ||
tt=uitable(obj.handle); | ||
tt.Position=obj.guihandles.partablepos.Position; | ||
tt.Position(4)=tt.Position(4)*7; | ||
obj.guihandles.parttable=tt; | ||
jsontxt=fileread(obj.jsondefault); | ||
obj.jsonstruct=jsondecode(jsontxt); | ||
makejsontable(obj); | ||
end | ||
% function initGui(obj) | ||
% [email protected](obj); | ||
% obj.jsonfile=obj.jsondefault; | ||
% tt=uitable(obj.handle); | ||
% tt.Position=obj.guihandles.partablepos.Position; | ||
% tt.Position(4)=tt.Position(4)*7; | ||
% obj.guihandles.parttable=tt; | ||
% jsontxt=fileread(obj.jsondefault); | ||
% obj.jsonstruct=jsondecode(jsontxt); | ||
% makejsontable(obj); | ||
% end | ||
|
||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.