26class MultiFileVolumeList;
44 static const char *
const IconBuildModeStrings[NumIconBuildModes];
77 const size_t volumeIndex);
225 fieldIdName =
orig.fieldIdName;
226 rawTagId =
orig.rawTagId;
227 headInfo =
orig.headInfo;
Project global and OS specific declarations.
#define MLDIRECTDICOMIMPORTOUTPUTS_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Field to encapsulate an enumerated value.
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Base class for all fields used in the ML.
Field to encapsulate an integer value.
Simple class to manage a list view column.
DCMTree::RawTagId rawTagId
Raw Tag Id of tag to be shown, may be 0 for non DICOM tags.
DirectDicomImportColumnDesc(const std::string &fldName, DCMTree::RawTagId id, const std::string &info)
Convenience constructor.
DirectDicomImportColumnDesc(const DirectDicomImportColumnDesc &orig)
Copy constructor.
DirectDicomImportColumnDesc & operator=(const DirectDicomImportColumnDesc &orig)
Assignment operator.
std::string fieldIdName
String Id of the list view column, must be unique and non empty.
std::string headInfo
String to be shown in column head of ListView.
Manages the volume list view and its contents for the DirectDicomImport module.
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 validCacheFile...
EnumField * _iconBuildModeFld
Selects the mode how and from which slices of the image the icons in the volume table are created,...
std::vector< std::vector< _ColumnNameHeadValue > > _ColumnNameHeadValueVector
Type used for managing and sorting all rows and columns of the ListView.
void _checkIdxSortTagValue() const
Logs an ML error if _idxSortTagValueFld has an invalid content.
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.
const BoolField & getUseThumbNailsField() const
Returns read access to the useThumbNails field; only allowed to be called after appendFields() call.
void updateVolumeListView(const MultiFileVolumeList &volumeList, size_t subSetStart=0u, size_t subSetEnd=std::string::npos)
Update the volume list with all columns.
BoolField * _useNumericTagValueSortingFld
If enabled then tags with value representations IS are interpreted as sign 32 bit integers and printe...
void handleNotification(Field &field, bool &updateVolumeListViewFlag, bool &updateThumbNails, bool &updateTableSort, bool isResultCachingPossible)
Handle field changes of the field field.
NotifyField * _updateThumbNailsFld
Field containing the path base to the pixMaps and to trigger an update of pixmaps on the volumeInfosF...
std::vector< DirectDicomImportColumnDesc > _columnDescs
Boolean fields to enable/disable tags.
StringField * _volumeListViewFld
The field containing the Volume table with columns.
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.
StringField * _columnConfigFld
Configuration string containing the list of column names to be displayed.
void updateSortOrderOfVolumeTable(MultiFileVolumeList &volumeList) const
Sorts the volumes according to the current sort mode.
IntField * _thumbNailsExtFld
Extent of thumbNails, default is 40.
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 ...
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 cacheFileNam...
MultiFileVolumeListView()
Constructor.
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,...
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.
virtual ~MultiFileVolumeListView()
Destructor.
BoolField * _useThumbNailsField
Field containing the pointer to the thumbnail enable/disable toggle.
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 whic...
BoolField * _sortUpwardsFld
If enabled sorting orders the higher values to first, otherwise to last position.
StringField * _idxSortTagValueFld
Field specifying a DICOM tag whose value is used to sort the volume list; only used when_sortMode is ...
IconBuildMode
Modes how icons shall be generated.
@ UseMiddleSlice
Fist slice of image is used to build the icon.
void appendFields(FieldContainer &fieldContainer)
Creates all bool fields for volume vie columns. To be called in constructor.
EnumField * _sortModeFld
Enumerator field showing all sort modes for list of output volumes, default is MultiFileVolumeList::N...
void checkSortParameters() const
Perform some checks on sort parameters and logs errors if necessary.
std::vector< size_t > _determineTableColumnOrder() const
Parse the _columnConfigFld and determines the order of visible columns.
Class managing a list of MultiFileVolume instances for the DirectDicomImport module; taking ownership...
Field without value for notifications.
Field to encapsulate a string value.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< const Tree > Const_TreePtr
Composition of a column name, the head entry, and the column value.
std::string head
Entry to be shown in the head line.
std::string name
Unique name of the column, take care it must exist only once.
std::string value
The column entry value.