User Defined Filter
You can use your own scripts as image filters for your data. Examples of these user-defined scripts can be found in the ImportGeo folder within the GeoDict installation folder, as well as in the GeoDict settings folder.
The PhansalkarFilter.py script can be used to learn how to obtain and modify the image data that is shown in the ImportGeo-Vol box. Click Browse to navigate to the GeoPy macro. Then, click Edit Script to open the file in a text editor. In the macro, use the command
im = gd.ImportGeoVol.getOriginalImage()
to load the actual image with the Python script and
filteredImage = gd.ImportGeoVol.getNewImage()
to create a new image.
You can then extract the dimensions with the shape command:
nx=filteredImage.shape[0]
ny=filteredImage.shape[1]
nz=filteredImage.shape[2]
The Phansalkar script uses loops over each image voxel to determine whether the corresponding voxel should be set to white [255] or black [0]. It is sufficient to change the new image (filteredImage). For more details on this topic, please refer to the Phansalkar section and the GeoPy scripting user guide.
For scripts containing parameters that can be varied as inputs, click Parameters to edit them.
Click Apply to run a selected script.
Know how! You can Save your current settings for this tool as Start-Up Settings . The next time you process an image, these settings will be automatically loaded and filled into the parameter fields. You can also load the Built-In Default Settings available in GeoDict. If you change any settings and want to revert to your saved start-up settings, click the corresponding button to Load the Start-Up Settings . |