Section: Visualization Toolkit IO Classes
To create an instance of class vtkSortFileNames, simply invoke its constructor as follows
obj = vtkSortFileNames
obj
is an instance of the vtkSortFileNames class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkSortFileNames = obj.NewInstance ()
vtkSortFileNames = obj.SafeDownCast (vtkObject o)
obj.SetGrouping (int )
- Sort the file names into groups, according to similarity in
filename name and path. Files in different directories,
or with different extensions, or which do not fit into the same
numbered series will be placed into different groups. This is
off by default.
int = obj.GetGrouping ()
- Sort the file names into groups, according to similarity in
filename name and path. Files in different directories,
or with different extensions, or which do not fit into the same
numbered series will be placed into different groups. This is
off by default.
obj.GroupingOn ()
- Sort the file names into groups, according to similarity in
filename name and path. Files in different directories,
or with different extensions, or which do not fit into the same
numbered series will be placed into different groups. This is
off by default.
obj.GroupingOff ()
- Sort the file names into groups, according to similarity in
filename name and path. Files in different directories,
or with different extensions, or which do not fit into the same
numbered series will be placed into different groups. This is
off by default.
obj.SetNumericSort (int )
- Sort the files numerically, rather than lexicographically.
For filenames that contain numbers, this means the order will be
["file8.dat", "file9.dat", "file10.dat"]
instead of the usual alphabetic sorting order
["file10.dat" "file8.dat", "file9.dat"].
NumericSort is off by default.
int = obj.GetNumericSort ()
- Sort the files numerically, rather than lexicographically.
For filenames that contain numbers, this means the order will be
["file8.dat", "file9.dat", "file10.dat"]
instead of the usual alphabetic sorting order
["file10.dat" "file8.dat", "file9.dat"].
NumericSort is off by default.
obj.NumericSortOn ()
- Sort the files numerically, rather than lexicographically.
For filenames that contain numbers, this means the order will be
["file8.dat", "file9.dat", "file10.dat"]
instead of the usual alphabetic sorting order
["file10.dat" "file8.dat", "file9.dat"].
NumericSort is off by default.
obj.NumericSortOff ()
- Sort the files numerically, rather than lexicographically.
For filenames that contain numbers, this means the order will be
["file8.dat", "file9.dat", "file10.dat"]
instead of the usual alphabetic sorting order
["file10.dat" "file8.dat", "file9.dat"].
NumericSort is off by default.
obj.SetIgnoreCase (int )
- Ignore case when sorting. This flag is honored by both
the sorting and the grouping. This is off by default.
int = obj.GetIgnoreCase ()
- Ignore case when sorting. This flag is honored by both
the sorting and the grouping. This is off by default.
obj.IgnoreCaseOn ()
- Ignore case when sorting. This flag is honored by both
the sorting and the grouping. This is off by default.
obj.IgnoreCaseOff ()
- Ignore case when sorting. This flag is honored by both
the sorting and the grouping. This is off by default.
obj.SetSkipDirectories (int )
- Skip directories. If this flag is set, any input item that
is a directory rather than a file will not be included in
the output. This is off by default.
int = obj.GetSkipDirectories ()
- Skip directories. If this flag is set, any input item that
is a directory rather than a file will not be included in
the output. This is off by default.
obj.SkipDirectoriesOn ()
- Skip directories. If this flag is set, any input item that
is a directory rather than a file will not be included in
the output. This is off by default.
obj.SkipDirectoriesOff ()
- Skip directories. If this flag is set, any input item that
is a directory rather than a file will not be included in
the output. This is off by default.
obj.SetInputFileNames (vtkStringArray input)
- Set a list of file names to group and sort.
vtkStringArray = obj.GetInputFileNames ()
- Set a list of file names to group and sort.
vtkStringArray = obj.GetFileNames ()
- Get the full list of sorted filenames.
int = obj.GetNumberOfGroups ()
- Get the number of groups that the names were split into, if
grouping is on. The filenames are automatically split into
groups, where the filenames in each group will be identical
except for their series numbers. If grouping is not on, this
method will return zero.
vtkStringArray = obj.GetNthGroup (int i)
- Get the Nth group of file names. This method should only
be used if grouping is on. If grouping is off, it will always
return null.
obj.Update ()
- Update the output filenames from the input filenames.
This method is called automatically by GetFileNames()
and GetNumberOfGroups() if the input names have changed.