Skip to content

Commit

Permalink
Upate python codes to WriteDREAM3DFilter
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Nov 13, 2023
1 parent 768994d commit 03e6924
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion wrapping/python/examples/basic_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@


output_file_path = "/tmp/output_file_example.dream3d"
result = cx.ExportDREAM3DFilter.execute(data_structure=data_structure,
result = cx.WriteDREAM3DFilter.execute(data_structure=data_structure,
export_file_path=output_file_path,
write_xdmf_file=True)
if len(result.errors) != 0:
Expand Down
8 changes: 4 additions & 4 deletions wrapping/python/examples/basic_ebsd_ipf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Rotate the Euler Reference Frame
#------------------------------------------------------------------------------
result = cxor.RotateEulerRefFrameFilter.execute(data_structure=data_structure,
cell_euler_angles_array_path=cx.DataPath(["Small IN100", "Scan Data", "EulerAngles"]),
euler_angles_array_path=cx.DataPath(["Small IN100", "Scan Data", "EulerAngles"]),
rotation_axis=[0,0,1,90])
if len(result.errors) != 0:
print('Errors: {}', result.errors)
Expand Down Expand Up @@ -139,7 +139,7 @@
#------------------------------------------------------------------------------
color_control_points = cx.Json('{"RGBPoints": [0,0,0,0,0.4,0.901960784314,0,0,0.8,0.901960784314,0.901960784314,0,1,1,1,1]}')
result = cx.GenerateColorTableFilter.execute(data_structure=data_structure,
rgb_array_path="CI Color",
output_rgb_array_name="CI Color",
selected_data_array_path=cx.DataPath(["Small IN100", "Scan Data", "Confidence Index"]),
selected_preset=color_control_points)
if len(result.errors) != 0:
Expand Down Expand Up @@ -181,14 +181,14 @@
# Write the DataStructure to a .dream3d file
#------------------------------------------------------------------------------
output_file_path = "basic_ebsd_example.dream3d"
result = cx.ExportDREAM3DFilter.execute(data_structure=data_structure,
result = cx.WriteDREAM3DFilter.execute(data_structure=data_structure,
export_file_path=output_file_path,
write_xdmf_file=True)
if len(result.errors) != 0:
print('Errors: {}', result.errors)
print('Warnings: {}', result.warnings)
else:
print("No errors running the ExportDREAM3DFilter")
print("No errors running the WriteDREAM3DFilter")



Expand Down
4 changes: 2 additions & 2 deletions wrapping/python/examples/geometry_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@


output_file_path = "geometry_examples.dream3d"
result = cx.ExportDREAM3DFilter.execute(data_structure=data_structure, export_file_path=output_file_path, write_xdmf_file=True)
result = cx.WriteDREAM3DFilter.execute(data_structure=data_structure, export_file_path=output_file_path, write_xdmf_file=True)
if len(result.errors) != 0:
print('Errors: {}', result.errors)
print('Warnings: {}', result.warnings)
else:
print("No errors running the ExportDREAM3DFilter filter")
print("No errors running the WriteDREAM3DFilter filter")
4 changes: 2 additions & 2 deletions wrapping/python/examples/import_d3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
# Write the DataStructure to a .dream3d file
#------------------------------------------------------------------------------
output_file_path = "/tmp/import_data.dream3d"
result = cx.ExportDREAM3DFilter.execute(data_structure=data_structure,
result = cx.WriteDREAM3DFilter.execute(data_structure=data_structure,
export_file_path=output_file_path,
write_xdmf_file=True)
if len(result.errors) != 0:
print('Errors: {}', result.errors)
print('Warnings: {}', result.warnings)
else:
print("No errors running the ExportDREAM3DFilter")
print("No errors running the WriteDREAM3DFilter")


#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion wrapping/python/examples/output_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
print(npdata)

output_file_path = "output_file_example.dream3d"
result = cx.ExportDREAM3DFilter.execute(data_structure=data_structure,
result = cx.WriteDREAM3DFilter.execute(data_structure=data_structure,
export_file_path=output_file_path,
write_xdmf_file=True)
if len(result.errors) != 0:
Expand Down

0 comments on commit 03e6924

Please sign in to comment.