VTK
|
Group and sort a set of filenames. More...
#include <vtkSortFileNames.h>
Group and sort a set of filenames.
vtkSortFileNames will take a list of filenames (e.g. from a file load dialog) and sort them into one or more series. If the input list of filenames contains any directories, these can be removed before sorting using the SkipDirectories flag. This class should be used where information about the series groupings can be determined by the filenames, but it might not be successful in cases where the information about the series groupings is stored in the files themselves (e.g DICOM).
Definition at line 46 of file vtkSortFileNames.h.
Reimplemented from vtkObject.
Definition at line 50 of file vtkSortFileNames.h.
vtkSortFileNames::vtkSortFileNames | ( | ) | [protected] |
vtkSortFileNames::~vtkSortFileNames | ( | ) | [protected] |
static int vtkSortFileNames::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
virtual int vtkSortFileNames::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
static vtkSortFileNames* vtkSortFileNames::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkSortFileNames::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
vtkSortFileNames* vtkSortFileNames::NewInstance | ( | ) | const |
Reimplemented from vtkObject.
void vtkSortFileNames::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
static vtkSortFileNames* vtkSortFileNames::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
virtual void vtkSortFileNames::SetGrouping | ( | int | ) | [virtual] |
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.
virtual int vtkSortFileNames::GetGrouping | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::GroupingOn | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::GroupingOff | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::SetNumericSort | ( | int | ) | [virtual] |
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.
virtual int vtkSortFileNames::GetNumericSort | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::NumericSortOn | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::NumericSortOff | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::SetIgnoreCase | ( | int | ) | [virtual] |
Ignore case when sorting. This flag is honored by both the sorting and the grouping. This is off by default.
virtual int vtkSortFileNames::GetIgnoreCase | ( | ) | [virtual] |
Ignore case when sorting. This flag is honored by both the sorting and the grouping. This is off by default.
virtual void vtkSortFileNames::IgnoreCaseOn | ( | ) | [virtual] |
Ignore case when sorting. This flag is honored by both the sorting and the grouping. This is off by default.
virtual void vtkSortFileNames::IgnoreCaseOff | ( | ) | [virtual] |
Ignore case when sorting. This flag is honored by both the sorting and the grouping. This is off by default.
virtual void vtkSortFileNames::SetSkipDirectories | ( | int | ) | [virtual] |
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.
virtual int vtkSortFileNames::GetSkipDirectories | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::SkipDirectoriesOn | ( | ) | [virtual] |
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.
virtual void vtkSortFileNames::SkipDirectoriesOff | ( | ) | [virtual] |
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.
void vtkSortFileNames::SetInputFileNames | ( | vtkStringArray * | input | ) |
Set a list of file names to group and sort.
virtual vtkStringArray* vtkSortFileNames::GetInputFileNames | ( | ) | [virtual] |
Set a list of file names to group and sort.
virtual vtkStringArray* vtkSortFileNames::GetFileNames | ( | ) | [virtual] |
Get the full list of sorted filenames.
virtual int vtkSortFileNames::GetNumberOfGroups | ( | ) | [virtual] |
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.
virtual vtkStringArray* vtkSortFileNames::GetNthGroup | ( | int | i | ) | [virtual] |
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.
virtual void vtkSortFileNames::Update | ( | ) | [virtual] |
Update the output filenames from the input filenames. This method is called automatically by GetFileNames() and GetNumberOfGroups() if the input names have changed.
virtual void vtkSortFileNames::Execute | ( | ) | [protected, virtual] |
Fill the output.
virtual void vtkSortFileNames::SortFileNames | ( | vtkStringArray * | input, |
vtkStringArray * | output | ||
) | [protected, virtual] |
Sort the input string array, and append the results to the output.
virtual void vtkSortFileNames::GroupFileNames | ( | vtkStringArray * | input, |
vtkStringArrayVector * | output | ||
) | [protected, virtual] |
Separate a string array into groups and append them to the output.
int vtkSortFileNames::NumericSort [protected] |
Definition at line 120 of file vtkSortFileNames.h.
int vtkSortFileNames::IgnoreCase [protected] |
Definition at line 121 of file vtkSortFileNames.h.
int vtkSortFileNames::Grouping [protected] |
Definition at line 122 of file vtkSortFileNames.h.
int vtkSortFileNames::SkipDirectories [protected] |
Definition at line 123 of file vtkSortFileNames.h.
vtkTimeStamp vtkSortFileNames::UpdateTime [protected] |
Definition at line 125 of file vtkSortFileNames.h.
vtkStringArray* vtkSortFileNames::InputFileNames [protected] |
Definition at line 127 of file vtkSortFileNames.h.
vtkStringArray* vtkSortFileNames::FileNames [protected] |
Definition at line 128 of file vtkSortFileNames.h.
vtkStringArrayVector* vtkSortFileNames::Groups [protected] |
Definition at line 129 of file vtkSortFileNames.h.