-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Reduce memory usage of DICOM indexer #887
Conversation
Libs/DICOM/Core/ctkDICOMDatabase.h
Outdated
@@ -198,6 +199,13 @@ class CTK_DICOM_CORE_EXPORT ctkDICOMDatabase : public QObject | |||
void setTagsToPrecache(const QStringList tags); | |||
const QStringList tagsToPrecache(); | |||
|
|||
/// \brief Tags that must not be stored in the tag cache. | |||
/// Tag may be excluded from storage if it is not suitable for storage in the database or it is usually too large. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... or it is usually
-> ...or if it is usually
Libs/DICOM/Core/ctkDICOMDatabase.h
Outdated
@@ -198,6 +199,13 @@ class CTK_DICOM_CORE_EXPORT ctkDICOMDatabase : public QObject | |||
void setTagsToPrecache(const QStringList tags); | |||
const QStringList tagsToPrecache(); | |||
|
|||
/// \brief Tags that must not be stored in the tag cache. | |||
/// Tag may be excluded from storage if it is not suitable for storage in the database or it is usually too large. | |||
/// Presence of non-empty tag can be still checked using instanceValueExists or fileValueExists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be still checked
-> can be still be checked
Libs/DICOM/Core/ctkDICOMDatabase.h
Outdated
Q_INVOKABLE QString instanceValue (const QString sopInstanceUID, const QString tag); | ||
Q_INVOKABLE QString instanceValue (const QString sopInstanceUID, const unsigned short group, const unsigned short element); | ||
Q_INVOKABLE QString fileValue (const QString fileName, const QString tag); | ||
Q_INVOKABLE QString fileValue (const QString fileName, const unsigned short group, const unsigned short element); | ||
Q_INVOKABLE bool tagToGroupElement (const QString tag, unsigned short& group, unsigned short& element); | ||
Q_INVOKABLE QString groupElementToTag (const unsigned short& group, const unsigned short& element); | ||
|
||
/// \brief Check if an element with the given attribute tag exists in the dataset and has a non-empty value. | ||
/// @param sopInstanceUID A string with the uid for a given instance | ||
/// (corresponding file will be found via database) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
via database
-> via the database
Allow defining cached tags that are not stored in the DICOM tag cache by value. This prevents excessive memory usage and file reading for tags that are not appropriate to store in the tag cache (such as pixel data) but it is still possible to query if the tag is present. Force updating the database after a certain number of files are parsed. This limits the total memory usage, which could grew big when hundreds of thousands of files were parsed in one batch. Fixed updating existing images (identified by SOPInstanceUID) when they are loaded from a different file. Do not show all series when the browser is initially shown, as this can take significant amount of time when a large database is loaded.
0341a57
to
f91a647
Compare
Thank you, I've fixed the comments. |
Allow defining cached tags that are not stored in the DICOM tag cache by value. This prevents excessive memory usage and file reading for tags that are not appropriate to store in the tag cache (such as pixel data) but it is still possible to query if the tag is present.
Force updating the database after a certain number of files are parsed. This limits the total memory usage, which could grew big when hundreds of thousands of files were parsed in one batch.
Do not show all series when the browser is initially shown, as this can take significant amount of time when a large database is loaded.