|
MeVisLab Toolbox Reference
|
Manages the volume list view and its contents for the DirectDicomImport module. More...
#include <mlMultiFileVolumeListView.h>
Classes | |
| struct | _ColumnNameHeadValue |
| Composition of a column name, the head entry, and the column value. More... | |
| class | DirectDicomImportColumnDesc |
| Simple class to manage a list view column. More... | |
Public Types | |
| enum | IconBuildMode { UseFirstSlice = 0 , UseMiddleSlice , NumIconBuildModes } |
| Modes how icons shall be generated. More... | |
Public Member Functions | |
| MultiFileVolumeListView () | |
| Constructor. | |
| virtual | ~MultiFileVolumeListView () |
| Destructor. | |
| void | appendFields (FieldContainer &fieldContainer) |
| Creates all bool fields for volume vie columns. To be called in constructor. | |
| void | checkSortParameters () const |
| Perform some checks on sort parameters and logs errors if necessary. | |
| void | handleNotification (Field &field, bool &updateVolumeListViewFlag, bool &updateThumbNails, bool &updateTableSort, bool isResultCachingPossible) |
| Handle field changes of the field field. | |
| void | updateSortOrderOfVolumeTable (MultiFileVolumeList &volumeList) const |
| Sorts the volumes according to the current sort mode. | |
| void | updateThumbNailFiles (MultiFileVolumeList &volumeList, const std::string &validCacheDir, const std::string &validCacheFileName) |
| Update the list of thumbnails from the source volumes and write them in the cache directory. | |
| void | updateVolumeListView (const MultiFileVolumeList &volumeList, size_t subSetStart=0u, size_t subSetEnd=std::string::npos) |
| Update the volume list with all columns. | |
| const BoolField & | getUseThumbNailsField () const |
| Returns read access to the useThumbNails field; only allowed to be called after appendFields() call. | |
Static Public Member Functions | |
| static std::string | createThumbFileName (const std::string &cacheDir, const std::string &cacheFileName, const size_t volumeIndex) |
| Create file name for thumbNailFile with index v in directory cacheDir and for cache file cacheFileName. | |
| static void | removeThumbNail (const size_t volumeIndex, const std::string &validCacheDir, const std::string &validCacheFileName) |
| Removes possibly existing thumbnail with index volumeIndex with cachefileName validCacheFileName which has been stored in validCacheDir. | |
| static void | removeThumbNails (const size_t numVolumes, const std::string &validCacheDir, const std::string &validCacheFileName) |
| Removes possibly existing thumbnails indexed from 0 to numVolumes-1 with cachefileName validCacheFileName which have been stored in validCacheDir. | |
| static void | replaceNonTableViewChars (const std::string &columnSubStr, std::string &correctedStr) |
| Replaces all string components in columnSubStr which could disturb the list view such as newlines, @'s etc. | |
Static Public Attributes | |
| static const char *const | IconBuildModeStrings [NumIconBuildModes] |
| Strings corresponding to IconBuildModes. | |
Protected Types | |
| typedef std::vector< std::vector< _ColumnNameHeadValue > > | _ColumnNameHeadValueVector |
| Type used for managing and sorting all rows and columns of the ListView. | |
Protected Member Functions | |
| void | _checkIdxSortTagValue () const |
| Logs an ML error if _idxSortTagValueFld has an invalid content. | |
| std::string | _getUserTagVal (DCMTree::Const_TreePtr tree, size_t idx, bool useNumericTagValueSorting) const |
| Returns the value of the tag specified in user tag id fields from tree or "" if not possible. | |
| void | _appendTableColumn (const size_t &volumeIdx, DCMTree::Const_TreePtr tree, size_t &descIdx, bool isFirst, const std::string &userVal, bool isTagValue, _ColumnNameHeadValueVector &tableColumns) const |
| Updates head line and value for the volume view list. | |
| std::vector< size_t > | _determineTableColumnOrder () const |
| Parse the _columnConfigFld and determines the order of visible columns. | |
| void | _buildTableString (const _ColumnNameHeadValueVector &tableColumns, bool showDots, std::string &tableString) const |
| Build the final table string from all row/column entries; if showDots is true then a final line with dots is appended to show that the list is not shown completely. | |
Protected Attributes | |
| StringField * | _volumeListViewFld = nullptr |
| The field containing the Volume table with columns. | |
| EnumField * | _sortModeFld = nullptr |
| Enumerator field showing all sort modes for list of output volumes, default is MultiFileVolumeList::NumVoxels. | |
| BoolField * | _sortUpwardsFld = nullptr |
| If enabled sorting orders the higher values to first, otherwise to last position. | |
| StringField * | _idxSortTagValueFld = nullptr |
| Field specifying a DICOM tag whose value is used to sort the volume list; only used when_sortMode is MultiFileVolumeList::SortAccordingDcmTag. | |
| BoolField * | _useNumericTagValueSortingFld = nullptr |
| If enabled then tags with value representations IS are interpreted as sign 32 bit integers and printed with "-" for negative values and leading spaces to fill 9 characters to make all tag values sortable uniquely. | |
| IntField * | _thumbNailsExtFld = nullptr |
| Extent of thumbNails, default is 40. | |
| NotifyField * | _updateThumbNailsFld = nullptr |
| Field containing the path base to the pixMaps and to trigger an update of pixmaps on the volumeInfosFld. | |
| BoolField * | _useThumbNailsField = nullptr |
| Field containing the pointer to the thumbnail enable/disable toggle. | |
| StringField * | _userColumnTagFld [3] = {nullptr,nullptr,nullptr} |
| Three tag ids specifying tag values to be shown in the volume list. | |
| StringField * | _columnConfigFld = nullptr |
| Configuration string containing the list of column names to be displayed. | |
| EnumField * | _iconBuildModeFld = nullptr |
| Selects the mode how and from which slices of the image the icons in the volume table are created, default is UseMiddleSlice. | |
| IntField * | _indexColumnWidthFld = nullptr |
| Width of the index column in characters. | |
| std::vector< DirectDicomImportColumnDesc > | _columnDescs |
| Boolean fields to enable/disable tags. | |
Manages the volume list view and its contents for the DirectDicomImport module.
Definition at line 31 of file mlMultiFileVolumeListView.h.
|
protected |
Type used for managing and sorting all rows and columns of the ListView.
Definition at line 128 of file mlMultiFileVolumeListView.h.
Modes how icons shall be generated.
Definition at line 36 of file mlMultiFileVolumeListView.h.
| ml::MultiFileVolumeListView::MultiFileVolumeListView | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Updates head line and value for the volume view list.
|
protected |
Build the final table string from all row/column entries; if showDots is true then a final line with dots is appended to show that the list is not shown completely.
|
protected |
Logs an ML error if _idxSortTagValueFld has an invalid content.
|
protected |
Parse the _columnConfigFld and determines the order of visible columns.
|
protected |
Returns the value of the tag specified in user tag id fields from tree or "" if not possible.
| void ml::MultiFileVolumeListView::appendFields | ( | FieldContainer & | fieldContainer | ) |
Creates all bool fields for volume vie columns. To be called in constructor.
| void ml::MultiFileVolumeListView::checkSortParameters | ( | ) | const |
Perform some checks on sort parameters and logs errors if necessary.
|
static |
Create file name for thumbNailFile with index v in directory cacheDir and for cache file cacheFileName.
Returns read access to the useThumbNails field; only allowed to be called after appendFields() call.
| void ml::MultiFileVolumeListView::handleNotification | ( | Field & | field, |
| bool & | updateVolumeListViewFlag, | ||
| bool & | updateThumbNails, | ||
| bool & | updateTableSort, | ||
| bool | isResultCachingPossible ) |
Handle field changes of the field field.
|
static |
Removes possibly existing thumbnail with index volumeIndex with cachefileName validCacheFileName which has been stored in validCacheDir.
File I/O errors on deletion of an existing file are posted as ML error, a non-existing file is ignored.
|
static |
Removes possibly existing thumbnails indexed from 0 to numVolumes-1 with cachefileName validCacheFileName which have been stored in validCacheDir.
File I/O errors on deletion of existing files are posted as ML error. Non-existing files are ignored.
|
static |
Replaces all string components in columnSubStr which could disturb the list view such as newlines, @'s etc.
| void ml::MultiFileVolumeListView::updateSortOrderOfVolumeTable | ( | MultiFileVolumeList & | volumeList | ) | const |
Sorts the volumes according to the current sort mode.
Updating of information fields is not done.
| void ml::MultiFileVolumeListView::updateThumbNailFiles | ( | MultiFileVolumeList & | volumeList, |
| const std::string & | validCacheDir, | ||
| const std::string & | validCacheFileName ) |
Update the list of thumbnails from the source volumes and write them in the cache directory.
| void ml::MultiFileVolumeListView::updateVolumeListView | ( | const MultiFileVolumeList & | volumeList, |
| size_t | subSetStart = 0u, | ||
| size_t | subSetEnd = std::string::npos ) |
Update the volume list with all columns.
| volumeList | The volume list to convert to a ListView table string. |
| subSetStart | Experimental: defines the first index inside the list to start from; if it is outside the list range then nothing is shown. |
| subSetEnd | Experimental: Last volume to display+1, may be larger than volume list it is always clamped into the valid list range; if clamp result is smaller than subSetStart then nothing is shown. |
|
protected |
Configuration string containing the list of column names to be displayed.
Definition at line 195 of file mlMultiFileVolumeListView.h.
|
protected |
Boolean fields to enable/disable tags.
Definition at line 241 of file mlMultiFileVolumeListView.h.
Selects the mode how and from which slices of the image the icons in the volume table are created, default is UseMiddleSlice.
Definition at line 199 of file mlMultiFileVolumeListView.h.
|
protected |
Field specifying a DICOM tag whose value is used to sort the volume list; only used when_sortMode is MultiFileVolumeList::SortAccordingDcmTag.
Definition at line 170 of file mlMultiFileVolumeListView.h.
Width of the index column in characters.
Definition at line 202 of file mlMultiFileVolumeListView.h.
Enumerator field showing all sort modes for list of output volumes, default is MultiFileVolumeList::NumVoxels.
Definition at line 163 of file mlMultiFileVolumeListView.h.
If enabled sorting orders the higher values to first, otherwise to last position.
Definition at line 166 of file mlMultiFileVolumeListView.h.
Extent of thumbNails, default is 40.
Definition at line 180 of file mlMultiFileVolumeListView.h.
|
protected |
Field containing the path base to the pixMaps and to trigger an update of pixmaps on the volumeInfosFld.
Definition at line 184 of file mlMultiFileVolumeListView.h.
If enabled then tags with value representations IS are interpreted as sign 32 bit integers and printed with "-" for negative values and leading spaces to fill 9 characters to make all tag values sortable uniquely.
If disabled then of the IS-valued tags the normal string values are read as they are stored in the tag.
Definition at line 177 of file mlMultiFileVolumeListView.h.
|
protected |
Three tag ids specifying tag values to be shown in the volume list.
Definition at line 192 of file mlMultiFileVolumeListView.h.
Field containing the pointer to the thumbnail enable/disable toggle.
This field pointer is set manually after creating that toggle as all other table columns toggles, too.
Definition at line 189 of file mlMultiFileVolumeListView.h.
|
protected |
The field containing the Volume table with columns.
Definition at line 159 of file mlMultiFileVolumeListView.h.
|
static |
Strings corresponding to IconBuildModes.
Definition at line 44 of file mlMultiFileVolumeListView.h.