![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Dicom/GUI/DicomBrowserFilterModel.h>
A QSortFilterProxyModel specifically for a DicomBrowserModel. More...
A QSortFilterProxyModel specifically for a DicomBrowserModel.
Check https://doc.qt.io/qt-5/model-view-programming.html for details about Qt's Model/View architecture.
Example:
Public Slots | |
| void | setOriginalOnly (bool flag) |
| If enabled only images with an Image Type (0008, 0008) of "ORIGINAL" will be part of the model. | |
| void | setModalitiesFilter (const std::vector< QString > &modalities) |
| Only show series that have a Modality (0008,0060) matching a value in the given list. | |
| void | setDateFilter (const std::optional< std::tuple< QDate, QDate > > &dateFilter) |
| Filters out series which date is outside the given date interval or series that don't specify an explicit date. | |
| void | setImagesVisible (bool hide) |
| Sets whether the sub-entries for images below series should be visible or not (visible by default). | |
Signals | |
| void | modalitiesFilterChanged (const std::vector< QString > &modalities) |
| void | dateFilterChanged (const std::optional< std::tuple< QDate, QDate > > &dateFilter) |
Public Member Functions | |
| DicomBrowserFilterModel (QObject *parent=nullptr) | |
| bool | filterAcceptsPatient (const DicomBrowserModel::Patient &patient, bool checkStudies=true) const |
| Accepts the patient when the name or comment matches the current filterRegExp. | |
| bool | filterAcceptsStudy (const DicomBrowserModel::Study &study, bool checkSeries=true) const |
| Accepts the study when the description or id matches the current filterRegExp. | |
| bool | filterAcceptsSeries (const DicomBrowserModel::Series &series) const |
| Accepts the series when the description matches the current filterRegExp. | |
| bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
| Calls filterAcceptsPatient, filterAcceptsStudy or filterAcceptsSeries depending on the index. | |
| bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
| const std::vector< QString > & | modalitiesFilter () const |
| Returns the current filtered modalities. | |
| const std::optional< std::tuple< QDate, QDate > > & | studyDateFilter () const |
| Returns the current filter for the study date. | |
| bool | imagesVisible () const |
| Returns whether images are visible. | |
| void | setFilterInvalidSeries (bool enable) |
| If enabled, filters out invalid Dicom series, i.e. series containing images with the following invalid tags: bitsAllocated, width, height, channels. | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| Overrides base class to make sure the check/uncheck behavior is consistent with the filtering. | |
| QList< Dicom::Series * > | selectedSeries () const |
| Returns all currently checked Series that are accepted by the filter. | |
Static Public Member Functions | |
| static std::tuple< QDate, QDate > | getFilterDateRange (const Dicom::Series &series) |
| Returns the date range of the series that is used for filtering. | |
Properties | |
| std::vector< QString > | modalitiesFilter |
| bool ImFusion::DicomBrowserFilterModel::filterAcceptsPatient | ( | const DicomBrowserModel::Patient & | patient, |
| bool | checkStudies = true ) const |
Accepts the patient when the name or comment matches the current filterRegExp.
When checkStudies is true, the patient is accepted when filterAcceptsStudy returns true for any study of this patient.
| bool ImFusion::DicomBrowserFilterModel::filterAcceptsStudy | ( | const DicomBrowserModel::Study & | study, |
| bool | checkSeries = true ) const |
Accepts the study when the description or id matches the current filterRegExp.
When checkSeries is true, the patient is accepted when filterAcceptsSeries returns true for any series of this study. A study is also accepted if its parent patient is accepted by filterAcceptsPatient.
| bool ImFusion::DicomBrowserFilterModel::filterAcceptsSeries | ( | const DicomBrowserModel::Series & | series | ) | const |
Accepts the series when the description matches the current filterRegExp.
A series is also accepted if its parent study is accepted by filterAcceptsStudy.
|
static |
Returns the date range of the series that is used for filtering.
See setDateFilter for details.
|
slot |
If enabled only images with an Image Type (0008, 0008) of "ORIGINAL" will be part of the model.
Disabled by default.
|
slot |
Only show series that have a Modality (0008,0060) matching a value in the given list.
Passing an empty list will not filter any series (default).
|
slot |
Filters out series which date is outside the given date interval or series that don't specify an explicit date.
The date of the series is determined by the following tags:
The first date in this order that is valid will be used, the other are ignored. The Acquisition Date is only used when all images of the series have a valid Acquisition Date. When the Acquisition Date is used, the series will be filtered out when the range of Acquisition Dates is not completely inside the filter range.
If set to std::nullopt, no date filtering is performed (default) Examples: