From 15618c55f9894d3bcea3be4950c1be55acc8c434 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Sun, 21 Jan 2018 15:58:57 +0000 Subject: [PATCH] Added ALLOWED_EXTENSIONS back to fsl.data.mesh - no way to have a deprecation warning on access though. --- fsl/data/mesh.py | 12 +++++++++++- fsl/data/vtk.py | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/fsl/data/mesh.py b/fsl/data/mesh.py index bb2d9b237..395c78e45 100644 --- a/fsl/data/mesh.py +++ b/fsl/data/mesh.py @@ -698,7 +698,7 @@ def needsFixing(vertices, indices, fnormals, loBounds, hiBounds): class TriangleMesh(Mesh): - """Deprecated - use :class:`fsl.data.mesh.Mesh`, or one 'of its sub-classes + """Deprecated - use :class:`fsl.data.mesh.Mesh`, or one of its sub-classes instead. """ @@ -783,3 +783,13 @@ def findReferenceImage(*args, **kwargs): """Deprecated - use :func:`fsl.data.vtk.findReferenceImage` instead. """ import fsl.data.vtk as fslvtk return fslvtk.findReferenceImage(*args, **kwargs) + + +ALLOWED_EXTENSIONS = ['.vtk'] +"""Deprecated, will be removed in fslpy 2.0.0. Use +:attr:`fsl.data.vtk.ALLOWED_EXTENSIONS` instead.""" + + +EXTENSION_DESCRIPTIONS = ['VTK polygon model file'] +"""Deprecated, will be removed in fslpy 2.0.0. Use +:attr:`fsl.data.vtk.EXTENSION_DESCRIPTIONS` instead.""" diff --git a/fsl/data/vtk.py b/fsl/data/vtk.py index e34d4146d..24835e7a3 100644 --- a/fsl/data/vtk.py +++ b/fsl/data/vtk.py @@ -7,6 +7,15 @@ """This module provides the :class:`VTKMesh` class, for loading triangle meshes from VTK files. +A handful of convenience functions are also in this module: + +.. autosummary:: + :nosignatures: + + loadVTKPolyDataFile + getFIRSTPrefix + findReferenceImage + .. note:: I/O support is very limited - currently, the only supported file type is the VTK legacy file format, containing the ``POLYDATA`` -- GitLab