You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently display fields are only updated on insertion of new datasets, but it would be important to also do it upon deletion. Fields that are "multi-instance" (i.e. not only related to a single instance but to a wider neighborhood such as number of images in series, last study date, etc.).
This is how these "multi-instance" roles work in the current version:
Get instances where the DisplayedFieldsUpdatedTimestamp is NULL
Reset container in role that stores the UIDs of the affected level that belong to the instances involved in the update. E.g. in the ctkDICOMDisplayedFieldGeneratorStudyNumberOfSeries class it is the set called UpdatedStudyInstanceUIDs.
For each instance to update, get the UID of the affected level and extend the set if needed. E.g. get study instance UID for the instance and insert to the UpdatedStudyInstanceUIDs set.
In the endUpdate function do an SQL query for the affected level and update the displayed field map accordingly. E.g. for each study stored in UpdatedStudyInstanceUIDs, get count of series in the study, and set the new DisplayedNumberOfSeries value in the study displayed fields map.
So what differs in case of removal:
Instead of using the DisplayedFieldsUpdatedTimestamp, we need to collect the instances that are being removed, and do steps 2 and 3 before the removal
Do step 4 after the removal
This is a considerable change, so a simple modification of the updateDisplayedFields function is not enough. One solution could be to simply add 2 and 3 in the beginning and 4 at the end of the ctkDICOMDatabase::removeSeries function. It would be some code duplication though, and also the start/end functions would be done for each series even if a study or patient is removed (so slower than the optimal, but probably not noticable).
The text was updated successfully, but these errors were encountered:
Currently display fields are only updated on insertion of new datasets, but it would be important to also do it upon deletion. Fields that are "multi-instance" (i.e. not only related to a single instance but to a wider neighborhood such as number of images in series, last study date, etc.).
This is how these "multi-instance" roles work in the current version:
DisplayedFieldsUpdatedTimestamp
is NULLctkDICOMDisplayedFieldGeneratorStudyNumberOfSeries
class it is the set calledUpdatedStudyInstanceUIDs
.UpdatedStudyInstanceUIDs
set.endUpdate
function do an SQL query for the affected level and update the displayed field map accordingly. E.g. for each study stored inUpdatedStudyInstanceUIDs
, get count of series in the study, and set the newDisplayedNumberOfSeries
value in the study displayed fields map.So what differs in case of removal:
DisplayedFieldsUpdatedTimestamp
, we need to collect the instances that are being removed, and do steps 2 and 3 before the removalThis is a considerable change, so a simple modification of the
updateDisplayedFields
function is not enough. One solution could be to simply add 2 and 3 in the beginning and 4 at the end of thectkDICOMDatabase::removeSeries
function. It would be some code duplication though, and also the start/end functions would be done for each series even if a study or patient is removed (so slower than the optimal, but probably not noticable).The text was updated successfully, but these errors were encountered: