News:

SMF - Just Installed!

Main Menu

Recent posts

#11
Dear Caroline,

in the case, that you only have a gdt-Structure, that you want to rescale, and that you have no gray value images or GAD objects, you can also use another method to rescale the gdt-structure by using ImportGeo-Vol.

  • Import the original GDT-file (GeoDict will automatically detect the original voxel length)
  • You need to use the Filter Image Size -> Scale
  • Choose in "Segmentation & Labeling" -> Image Segmentation -> Global Thresholding -> Multiple Thresholds -> Number of Thresholds like the number of Material IDs that you had in your original structure minus one (example below was for 3 different material IDs)
  • Press "Create Segmentation" and you are done

However, you need to be aware that this workflow can create unwanted artefacts, especially when you do a significant change in voxel length. Please check the structure after rescaling that it is still functional for you. If it is possible, it is better to do the re-scaling on gray value images when importing them into GeoDict, as Jürgen mentioned above.

Best, Roman
#12
Dear Caroline,

if you can do this depends on the origin of your structure model.

When you have all the analytic information (GAD data) of the structure (e.g. because it is the result of a FiberGeo - Create command),  you can use GadGeo - Edit Domain to rescale the whole model into a new voxel mesh. See https://geodict-userguide.math2market.de/2025/gadgeo_editdomain.html for details. This allows to rescale by non-integer factors.

When you import gray-value images in ImportGeo-Vol, you can also change the image resolution, and resample the gray values to a  new image with any given resolution.   

What you cannot do is to resample the voxel mesh with arbitrary factors. Here (in ProcessGeo), only integer values possible.

Regrads,
Jürgen

#13
Digital Battery Development / Rescale Simulation Domain by D...
Last post by Caroline - July 04, 2025, 10:46:07 AM
Dear Math2Market,

I heard that it is possible to rescale the simulation domain and the voxel size not only by integer values, but also by decimal numbers. Could you tell me how this can be done?
I would really like to run simulations faster this way, without losing too much accuracy.

All the best,
Caroline
#14
CT, µCT and FIB-SEM / Re: Multi-Directional FiberFin...
Last post by jdrunner - July 03, 2025, 05:11:53 PM
Addendum:

We applied the filter, tried the threshold analysis, as well as dilation of fibers. It seemed to do slightly better but still broke up the fibers quite a bit.

Are there any other suggestions to enhance the results? We have exhausted what we currently know with no significant improvement, and our deadline is rather quickly approaching. Thank you.

Respectfully,
Jack Davis
#15
CT, µCT and FIB-SEM / Re: Multi-Directional FiberFin...
Last post by jdrunner - June 26, 2025, 03:00:45 PM
Hello,

After applying the filter, it seemed to make the identification worse, as the number of identified fibers increased.

I tried messing around with the threshold to see if that would get accurate results, but unfortunately it did not work.

Is there anything else that could help in identifying the correct number of fibers and their lengths?

Respectfully,
Jack Davis
#16
Automation / Re: Grayvalues for Material ID...
Last post by Janine Hilden - June 24, 2025, 02:42:11 PM
Hi,

your code worked more or less for me. In your plot it seems, as if no solid material ID was found. Did you load the segmented structure file with material ID 1 and 2?

By the way, it would be great if you would copy paste your code here instead of using screenshots. Then, it would be easier for me to reproduce the problem ;) Use the "#" symbol above the editor to enter the code beginning and ending markers

However I did not understand, why you want to divide the X-values by 2? Then the histogram gets moved to the left. I assume, that you wanted to account for the problem of the different lengths of the arrays count and bin_edges. For that I think it would be better to just remove the last entry of bin_edges. Even better would be to use matplotlib instead to plot the histogram. You can find an example for a very basic plot below. Matplotlib offers many options to change the plotting style as desired.

Another improvement you find in my code example below is to get the gray values with numpy.where instead of a for loop. This is much faster for large gray value images.


import numpy as np
import matplotlib.pyplot as plt

VolumeInfo  = gd.getVolumeFieldsInfo() # get list of dictionaries of loaded Volume Fields and assign it to variable VolumeInfo
nx, ny, nz  = gd.getVolDimensions()    # get the number of voxels in X-, Y- and Z-direction and assign the numbers to variables
Structure   = gd.getStructure()        # assign 3D numpy array describing the loaded structure to the variable Structure

Name        = VolumeInfo[0]['name']    # assign the name of the volume field to the variable Name.
VolumeField = gd.getVolumeField(Name)  # assign the numpy array describing the volume field to the variable VolumeField
Statistic   = []                       # Create empty list to store the statistical values

grayvalues = np.empty((nx,ny,nz),dtype=np.float32) # create 3D numpy array with the same shape as the gray value image
material_ID = np.where(Structure[:,:,:]==1)        # find out where the structure has ID 1
grayvalues[material_ID]=VolumeField[material_ID]   # take the gray values where the structure has ID 1 and save them in the new field

flat      = grayvalues.flatten()

# ---------- plot with graph dialog GeoPy API ------------------
gDlg      = gd.makeGraphDialog()                   
graph     = gDlg.addGraph('Histogram', Name, "Voxel Count")
bin_count = 256
counts, bin_edges = np.histogram(flat,bins = bin_count, range=(0,255))

x_values = bin_edges[1:-1]   # crop the first value, because the number of zeros is not interesting, crop the last value to match the number of entries in counts
y_values = counts[1:]        # crop the first entry, because the number of zeros is not interesting
x_list   = x_values.tolist()
y_list   = y_values.tolist()

graph.addData(x_list,y_list, Name)     
gDlg.run()                                   

# ---------- plot with matplotlib ------------------
plt.hist(flat, bins=bin_edges)
plt.title('Histogram')
plt.xlabel('Gray Values')
plt.ylabel('Voxel Count')
plt.savefig('HistogramPlot.png')

#17
Automation / Re: Grayvalues for Material ID...
Last post by jdrunner - June 23, 2025, 05:30:51 PM
Hello,

Thank you for the helpful updates.

I was able to create histograms. However, for both Material ID 1and 2, the histogram outputs were the same (see below image).

[attachimg=1]

The graph output a count of voxels equivalent to the total amount of voxels present in the structure, with an attributed grayvalue of 0.

The code I ran can be seen below.

[attachimg=2].

I switched the values between 1 and 2 on line 16 (if Structure [j][k] ==2:).

Is there something I'm missing in regards to specifying the material ID or referencing the grayvalues? Thank you.
#18
Automation / Re: Job queue with student lic...
Last post by Janine Hilden - June 23, 2025, 04:58:04 PM
Hi TP,

following the topic in the User Guide I mentioned earlier, you can just record the execution of several macros into one. Just start Macro Recording and then in the Macro Execution Control select one macro after the other and click Record Only for each of them in the order you want to run them. Afterwards, end macro recording. Finally, you can run the new macro which then executes all the other macros automatically.

If you just want to run the same permeability simulation on different structures, it would be more elegant to just use one macro and the Python code shown in the tutorial I linked you in my earlier post. There, different structures are saved in one folder and the goal is to analyze Open and Closed Porosity on each of them automatically. You only have to replace the command for the open and closed porosity by the corresponding permeability simulation command.

Best regards,
Janine
#19
Automation / Re: Job queue with student lic...
Last post by tp - June 23, 2025, 12:02:06 PM
Hello Janine,

Thank you for the answer.
I just want to apply same modelling but on different structures. Is it possible to select different macros and run one after one automatically ? For the moment I should copy different macro on the same to run all the process I want.

Best regards

TP
#20
Automation / Re: Job queue with student lic...
Last post by Janine Hilden - June 23, 2025, 11:52:03 AM
Hello,

yes, the job queue server is not included in your license. For a job queue server you would need a floating license to access GeoDict from different machines in your internal network. Then you and your colleagues could send jobs to a defined job queue server. With a node-locked license you only have access to GeoDict from one machine. Thus, you don't have a job server machine.

However, if you know the macros to run beforehand, you can create a macro, that runs the other macros one after the other. The macro execution can be recorded in a macro the same way as all other commands. Find an example in the User Guide:
https://geodict-userguide.math2market.de/2025/automation_varymacrofromgeopymacro.html

Also, if you want to run the same commands with varying parameters on different structures, you only need one macro. Learn how to create a parameter macro here:
https://geodict-userguide.math2market.de/2025/automation_createparametermacro.html

If you model the structures with the GeoDict structure generators, this can just be part of the macro. If you have a stack of structures, you can automatically run the study on all structure files in one folder as described in the tutorial "Automating the handling of multiple datasets with GeoPy". Download the tutorial from our website and request the password via e-mail.
https://www.math2market.com/service-support/learning-opportunities/tutorials.html

Does this help you?

Best regards,
Janine