@@ -224,11 +224,18 @@ class ComputeMeshWarp(TVTKBaseInterface):
224
224
Example
225
225
-------
226
226
227
+ >>> from nipype.algorithms.mesh import have_tvtk
227
228
>>> import nipype.algorithms.mesh as m
228
- >>> dist = m.ComputeMeshWarp()
229
- >>> dist.inputs.surface1 = 'surf1.vtk'
230
- >>> dist.inputs.surface2 = 'surf2.vtk'
231
- >>> res = dist.run() # doctest: +SKIP
229
+ >>> if not have_tvtk:
230
+ ... dist = m.ComputeMeshWarp()
231
+ Traceback (most recent call last):
232
+ ...
233
+ ImportError: This interface requires tvtk to run.
234
+ >>> else:
235
+ ... dist = m.ComputeMeshWarp()
236
+ ... dist.inputs.surface1 = 'surf1.vtk'
237
+ ... dist.inputs.surface2 = 'surf2.vtk'
238
+ ... res = dist.run() # doctest: +SKIP
232
239
233
240
"""
234
241
@@ -355,12 +362,19 @@ class MeshWarpMaths(TVTKBaseInterface):
355
362
Example
356
363
-------
357
364
365
+ >>> from nipype.algorithms.mesh import have_tvtk
358
366
>>> import nipype.algorithms.mesh as m
359
- >>> mmath = m.MeshWarpMaths()
360
- >>> mmath.inputs.in_surf = 'surf1.vtk'
361
- >>> mmath.inputs.operator = 'surf2.vtk'
362
- >>> mmath.inputs.operation = 'mul'
363
- >>> res = mmath.run() # doctest: +SKIP
367
+ >>> if not have_tvtk:
368
+ ... mmath = m.MeshWarpMaths()
369
+ Traceback (most recent call last):
370
+ ...
371
+ ImportError: This interface requires tvtk to run.
372
+ >>> else:
373
+ ... mmath = m.MeshWarpMaths()
374
+ ... mmath.inputs.in_surf = 'surf1.vtk'
375
+ ... mmath.inputs.operator = 'surf2.vtk'
376
+ ... mmath.inputs.operation = 'mul'
377
+ ... res = mmath.run() # doctest: +SKIP
364
378
365
379
"""
366
380
0 commit comments