Skip to content

Commit 9bdf8ee

Browse files
committed
exporting vessel data properly now
1 parent 1f20bb7 commit 9bdf8ee

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

@PostProBackEnd/Export.m

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function Export(PPA)
1010
figure(PPA.ExportGUI.UIFigure); % bring export GUI to front
1111

1212
PPA.Update_Status(); % prints hor. bar
13-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting maps...');
13+
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting...');
1414

1515
% figure out what we actually should export...
1616
exportMapOverview = PPA.ExportGUI.ExpOverview.Value;
@@ -81,7 +81,7 @@ function Export(PPA)
8181
end
8282

8383
if exportMapOverview
84-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting overview projections...');
84+
PPA.Update_Status('Exporting overview projections...');
8585

8686
% create invisible temp figure, plot mip and depth map with colorbars and use
8787
% export_fig for proper exporting
@@ -137,7 +137,7 @@ function Export(PPA)
137137

138138
% export native resolution images, w or w/o compression, for best image quality
139139
if exportMapNative
140-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting native projections...');
140+
PPA.Update_Status('Exporting native projections...');
141141

142142
if PPA.ExportGUI.ExpNativePng.Value
143143
exportName = fullfile(exportFolder, [nameBase '_map.png']);
@@ -176,7 +176,7 @@ function Export(PPA)
176176

177177
% export map .mat file -----------------------------------------------------
178178
if expImMat
179-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting mat files...');
179+
PPA.Update_Status('Exporting mat files...');
180180

181181
if exportDepth
182182
SaveStruct.depthMapRGB = PPA.depthImage;
@@ -197,7 +197,7 @@ function Export(PPA)
197197

198198
% export vol .mat file -----------------------------------------------------
199199
if expVolMat
200-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting mat files...');
200+
PPA.Update_Status('Exporting mat files...');
201201
SaveStruct.volData = PPA.procVol;
202202
SaveStruct.x = PPA.xPlot;
203203
SaveStruct.y = PPA.yPlot;
@@ -214,7 +214,7 @@ function Export(PPA)
214214

215215
% export map to workspace --------------------------------------------------
216216
if expWrkIm
217-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting to workspace...');
217+
PPA.Update_Status('Exporting maps to workspace...');
218218
% NOTE permute and ' below to match first dim == x vector
219219
if exportDepth
220220
assignin('base', 'depthMapRGB', permute(PPA.depthImage, [2 1 3]));
@@ -229,7 +229,7 @@ function Export(PPA)
229229

230230
% export volume to workspace --------------------------------------------------
231231
if expWrkVol
232-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting to workspace...');
232+
PPA.Update_Status('Exporting volume to workspace...');
233233
assignin('base', 'procVol', PPA.procVol);
234234
assignin('base', 'x', PPA.xPlot);
235235
assignin('base', 'y', PPA.yPlot);
@@ -238,6 +238,7 @@ function Export(PPA)
238238

239239
% export log file --------------------------------------------------
240240
if exportLog
241+
PPA.Update_Status('Exporting log file...');
241242
exportName = fullfile(exportFolder, [nameBase '.txt']);
242243
fid = fopen(exportName, 'w+');
243244
fprintf(fid, '%s\n', PPA.MasterGUI.DebugText.Items{:});
@@ -247,8 +248,7 @@ function Export(PPA)
247248
% export vessel figures and data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
248249
% overview figures
249250
if (exportVesselOverview && (vesselOverviewJpg || vesselOverviewFig))
250-
PPA.Start_Wait_Bar(PPA.ExportGUI, 'Exporting vessel analysis figure...');
251-
251+
PPA.Update_Status('Exporting vessel analysis figure...');
252252
if vesselOverviewJpg
253253
exportName = fullfile(exportFolder, [nameBase '_vessels.jpg']);
254254
export_fig(PPA.VesselFigs.ResultsFig, exportName);
@@ -261,11 +261,19 @@ function Export(PPA)
261261

262262
% mat file with vessel data only
263263
if vesselMat
264+
PPA.Update_Status('Exporting vessel data...');
264265
VesselSaveStruct.AVA = PPA.AVA;
265266
exportName = fullfile(exportFolder, [nameBase '_vessels.mat']);
266267
save(exportName, '-struct', 'VesselSaveStruct', '-v7.3', '-nocompression');
267268
end
268269

270+
% save settings file?
271+
if PPA.ExportGUI.ExpProcessingSettings.Value
272+
PPA.Update_Status('Exporting current settings...');
273+
SettingsSaveStruct.PostProSettings = PPA.Get_Current_Settings();
274+
exportName = fullfile(exportFolder, [nameBase '_settings.mat']);
275+
save(exportName, '-struct', 'SettingsSaveStruct', '-v7.3', '-nocompression');
276+
end
269277

270278
PPA.exportCounter = exportCnt;
271279

SubGuis/ExportGui.mlapp

2.26 KB
Binary file not shown.

SubGuis/MapGui.mlapp

147 Bytes
Binary file not shown.

SubGuis/VesselGui.mlapp

115 Bytes
Binary file not shown.

SubModules/MatlabUtilities

0 commit comments

Comments
 (0)