adding url to io
@@ -34,6 +34,12 @@ def dict_to_vtk(data, filename, voxel_size=1, origin=(0, 0, 0)):
-----
Outputs a vtk, vtp or vti file that can opened in ParaView
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/dict_to_vtk.html>`_
+ to view online example.
+
"""
vs = voxel_size
for entry in data:
@@ -72,6 +78,12 @@ def to_vtk(im, filename, divide=False, downsample=False, voxel_size=1, vox=False
-----
Outputs a vtk, vtp or vti file that can opened in paraview
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/to_vtk.html>`_
+ to view online example.
+
"""
if len(im.shape) == 2:
im = im[:, :, np.newaxis]
@@ -125,6 +137,12 @@ def to_palabos(im, filename, solid=0):
Palabos will run the simulation applying the specified pressure drop from
x = 0 to x = -1.
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/to_palabos.html>`_
+ to view online example.
+
"""
# Create binary image for fluid and solid phases
bin_im = im == solid
@@ -218,6 +236,12 @@ def to_stl(im, filename, divide=False, downsample=False, voxel_size=1, vox=False
-----
Outputs an STL file that can opened in Paraview
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/to_stl.html>`_
+ to view online example.
+
"""
filename = sanitize_filename(filename, ext="stl", exclude_ext=True)
if len(im.shape) == 2:
@@ -284,6 +308,12 @@ def to_paraview(im, filename, phase=2):
-----
Outputs an pvsm file that can opened in Paraview.
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/to_paraview.html>`_
+ to view online example.
+
"""
try:
import paraview.simple
@@ -426,6 +456,12 @@ def open_paraview(filename=None, im=None, **kwargs):
sent to ``to_paraview`` and a state file is created with a random name.
Any additional keyword arguments are sent to ``to_paraview``.
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/open_paraview.html>`_
+ to view online example.
+
"""
if filename is None:
from datetime import datetime
@@ -470,6 +506,12 @@ def spheres_to_comsol(filename, im=None, centers=None, radii=None):
image. This is especially true for overlapping sphere and spheres extending
beyond the edge of the image.
+ Examples
+ --------
+ `Click here
+ <https://porespy.org/examples/io/reference/spheres_to_comsol.html>`_
+ to view online example.
+
"""
from ._comsol import _save_to_comsol
if im is not None:
