MeVisLab Toolbox Reference
|
Tool class to sort MultiFileVolumeLists according to specific properties. More...
#include <mlMultiFileVolumeListSort.h>
Public Types | |
enum | SortModes { NoSort = 0 , ValidVolumes , NumBytes , NumVoxels , XExtent , YExtent , ZExtent , CXExtent , TExtent , UExtent , VoxelVolume , VoxelTypeSize , NumVoxelComponents , NumSliceBytes , NumSliceVoxels , SortAccordingDcmTag , FilterLabel , NumberOfSortModes } |
Possible modes how to reorder the volumes. More... | |
Public Member Functions | |
MultiFileVolumeListSort () | |
void | sortVolumes (MultiFileVolumeList &mfvListToSort, SortModes sortMode, bool sortUpwards, MLint rawTagId, bool useNumericTagStringValueSorting) const |
Sorts mfvListToSort according the given sort criteria sortMode; it sorts larger values to the start if upwards is true, otherwise to the end. More... | |
Static Public Attributes | |
static const char *const | SortModeStrings [NumberOfSortModes] |
String table for all SortModes except of NumberOfSortModes. More... | |
Tool class to sort MultiFileVolumeLists according to specific properties.
Definition at line 24 of file mlMultiFileVolumeListSort.h.
Possible modes how to reorder the volumes.
Enumerator | |
---|---|
NoSort | No sorting is applied. |
ValidVolumes | Valid volumes are sorted to the start. |
NumBytes | Volumes with the highest number of bytes are sorted to the start. |
NumVoxels | Volumes with the highest number of voxels are sorted to the start. |
XExtent | Volumes with the biggest x extent are sorted to the start. |
YExtent | Volumes with the biggest y extent are sorted to the start. |
ZExtent | Volumes with the biggest z extent are sorted to the start. |
CXExtent | Volumes with the biggest c extent are sorted to the start. |
TExtent | Volumes with the biggest t extent are sorted to the start. |
UExtent | Volumes with the biggest u extent are sorted to the start. |
VoxelVolume | Volumes with the biggest voxel volume are sorted to the start. |
VoxelTypeSize | Volumes with the biggest voxel data type size are sorted to the start. |
NumVoxelComponents | Volumes with the biggest number of voxel components are sorted to the start. |
NumSliceBytes | Volumes with the highest number of bytes in slices are sorted to the start. |
NumSliceVoxels | Volumes with the highest number of voxels in slices are sorted to the start. |
SortAccordingDcmTag | Volumes are sorted according the value of the DICOM tag specified in the _idxSortTagValueFld of the MultiFileVolumeListView. If the tag value cannot be retrieved for any reason then an empty string is used as value for sorting. |
FilterLabel | Volumes are sorted according to their label define by input filter plugins. |
NumberOfSortModes | Number of Sort modes, do not use for sorting. |
Definition at line 28 of file mlMultiFileVolumeListSort.h.
|
inline |
Definition at line 57 of file mlMultiFileVolumeListSort.h.
void ml::MultiFileVolumeListSort::sortVolumes | ( | MultiFileVolumeList & | mfvListToSort, |
SortModes | sortMode, | ||
bool | sortUpwards, | ||
MLint | rawTagId, | ||
bool | useNumericTagStringValueSorting | ||
) | const |
Sorts mfvListToSort according the given sort criteria sortMode; it sorts larger values to the start if upwards is true, otherwise to the end.
If the sortMode SortAccordingDcmTag is used the value of the tag with the id rawTagId is used for sorting, otherwise rawTagId is ignored. If used and the tag value of the tag with rawTagId cannot be retrieved then an empty string is used as comparison value. Only rawTagIds >=0 are considered as valid tag values. If DICOM tag values are used for sorting then useNumericTagStringValueSorting=true makes them sorted numerically where useNumericTagStringValueSorting=false makes them sorted according the pure string value. In this modes invalid rawTagId values (< 0) make the list not changed at all; if values cannot be retrieved as string converted tag values then an empty string is used instead for sorting.
|
static |
String table for all SortModes except of NumberOfSortModes.
Definition at line 54 of file mlMultiFileVolumeListSort.h.