|
234 | 234 | parameter_table_position_tab2 = [0.01 0.74 0.54 0.13]; |
235 | 235 | parameter_table_tab2 = uitable('Parent',tab_particlesize,'Units','normalized','Position',parameter_table_position_tab2,'Visible','off','Enable','off','CellEditCallBack',@parameters_callback); |
236 | 236 |
|
237 | | -Diameter_Dz_along_3rd_axis = uicontrol('Parent',tab_particlesize,'Style','text','String','Diameter Dx along 3rd axis','Units','normalized','Position',[0.01 0.55 0.25 0.15],'Visible','off'); |
| 237 | +Diameter_Dz_along_3rd_axis = uicontrol('Parent',tab_particlesize,'Style','text','String','Diameter Dz along 3rd axis','Units','normalized','Position',[0.01 0.55 0.25 0.15],'Visible','off'); |
238 | 238 | Diameter_Dz_3rdaxis_table = uitable('Parent',tab_particlesize,'Units','normalized','Position',[0.01 0.53 0.25 0.15],'Visible','off','Enable','off','CellEditCallBack',@Dia_Dz_3rdaxis_table); |
239 | 239 | Diameter_Dz_3rdaxis_table.RowName = []; |
240 | 240 |
|
|
465 | 465 | Post_processing_table.ColumnEditable = [false true]; |
466 | 466 |
|
467 | 467 | %% Run Code tab 6 |
| 468 | +Title_tab6 = uicontrol('Parent',tab_run,'Style','text','String','Numerical generation','FontName',font_name_GUI,'FontSize',font_size_large_GUI,... |
| 469 | + 'BackgroundColor',background_description_tab,'ForegroundColor',ForegroundColor_description_tab,'Units','normalized','Position',[0,0.96,1,0.04]); % Heading |
| 470 | + |
| 471 | +Display_run_text = uicontrol('Parent',tab_run,'Style','text','String','How many times do you want to generate the microstructure with the same parameters?','FontSize',font_size_medium_GUI,'FontName',font_name_GUI,'FontWeight','bold',... |
| 472 | + 'HorizontalAlignment','left','Units','normalized','Position', [0.01 0.9 0.9 0.04]); |
468 | 473 |
|
469 | 474 | Num_of_run_text = uicontrol('Parent',tab_run,'Style','text','String','Number of Runs','FontSize',font_size_medium_GUI,'FontName',font_name_GUI,'Units','normalized','Position',[0.01,0.8,0.1,0.025],'Visible','on','Enable','on'); |
470 | 475 | Num_of_run_box = uicontrol('Parent',tab_run,'Style','edit','String',[],'FontSize',font_size_medium_GUI,'FontName',font_name_GUI,'Units','normalized','Position',[0.11,0.8,0.05,0.03],'Visible','on','Enable','on','CallBack',@callback_num_of_runs); |
|
482 | 487 | 'String','Error message','Visible','off'); |
483 | 488 |
|
484 | 489 | %% Generate Microstructure tab 7 |
| 490 | +Title_tab7 = uicontrol('Parent',tab_Generated_micro,'Style','text','String','Results','FontName',font_name_GUI,'FontSize',font_size_large_GUI,... |
| 491 | + 'BackgroundColor',background_description_tab,'ForegroundColor',ForegroundColor_description_tab,'Units','normalized','Position',[0,0.96,1,0.04]); % Heading |
| 492 | + |
| 493 | +Display_results_text = uicontrol('Parent',tab_Generated_micro,'Style','text','String','Table will be updated for each finished run','FontSize',font_size_medium_GUI,'FontName',font_name_GUI,'FontWeight','bold',... |
| 494 | + 'HorizontalAlignment','left','Units','normalized','Position', [0.01 0.9 0.9 0.04]); |
485 | 495 |
|
486 | 496 | % Table 1 |
487 | | -ltable_direction = [0.3 0.5 0.35 0.15]; |
| 497 | +ltable_direction = [0.1 0.25 0.8 0.65]; |
488 | 498 | table_output = uitable('Parent',tab_Generated_micro,'Units','normalized','Position',ltable_direction,'FontName',font_name_GUI,'FontSize',font_size_small_GUI,'CellEditCallBack',@edit_table_output,'Visible','off','Enable','off'); |
489 | 499 | table_output.ColumnName = {'Attempt','Volume fraction','Tortuosity factor','Elapsed time'}; |
490 | 500 | table_output.RowName = []; |
491 | | -table_output.ColumnWidth = {ltable*0.15, ltable*0.2, ltable*0.2, ltable*0.15}; |
| 501 | +table_output.ColumnWidth = {ltable*0.4, ltable*0.4, ltable*0.4, ltable*0.4}; |
492 | 502 | %% CALLBACK FUNCTIONS for Phase and Volume Fraction Calculation tab1 |
493 | 503 |
|
494 | 504 | % Callback function for voxel size and scaling factor |
@@ -1878,13 +1888,13 @@ function Generate_Micro_Struct(~,~) |
1878 | 1888 | function_save_tif( uint8(microstructure3D.phase),[str_filename '_phase.tif']); |
1879 | 1889 | function_save_tif( uint16(microstructure3D.particle_id),[str_filename '_particle.tif']); |
1880 | 1890 |
|
1881 | | -% % Rescale |
1882 | | -% parameters_scaling.scaling_factor = 1/(str2double(Edit_Scalingfactor.String)); % Get scaling factor |
1883 | | -% parameters_scaling.label_or_greylevel = 'Label'; |
1884 | | -% parameters_scaling.background = 0; |
1885 | | -% [Microstructure_resized] = uint8(function_scaling(uint8(microstructure3D.phase),parameters_scaling)); |
1886 | | -% str_filename = [Text_savefolder.String 'Volume_' num2str(k) '_phase_rescaled.tif']; |
1887 | | -% function_save_tif(Microstructure_resized,str_filename); |
| 1891 | + % Rescale |
| 1892 | + parameters_scaling.scaling_factor = 1/(str2double(Edit_Scalingfactor.String)); % Get scaling factor |
| 1893 | + parameters_scaling.label_or_greylevel = 'Label'; |
| 1894 | + parameters_scaling.background = 0; |
| 1895 | + [Microstructure_resized] = uint8(function_scaling(uint8(microstructure3D.phase),parameters_scaling)); |
| 1896 | + str_filename = [Text_savefolder.String 'Volume_' num2str(k) '_phase_rescaled.tif']; |
| 1897 | + function_save_tif(Microstructure_resized,str_filename); |
1888 | 1898 | end |
1889 | 1899 |
|
1890 | 1900 |
|
|
0 commit comments