Skip to content

Commit

Permalink
Merge pull request #226 from RENCI/224_show_whole_volume_on_top
Browse files Browse the repository at this point in the history
224 show whole volume on top
  • Loading branch information
hyi authored Jan 6, 2023
2 parents 65e4bf9 + 97f8657 commit 6eefc6c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
merge_region_to_active_assignment, set_assignment_meta, get_history_info, \
assign_region_to_user, add_meta_to_history, check_subvolume_done, \
reject_assignment, update_assignment_in_whole_item, get_assignment_status, \
add_user_active_assignment_metadata, save_content_data, save_added_and_removed_regions, \
WHOLE_ITEM_NAME, save_content_data, save_added_and_removed_regions, \
update_all_assignment_masks_async


Expand Down Expand Up @@ -304,7 +304,7 @@ def get_subvolume_item_ids(training):
})
for folder in folders:
whole_item = Item().findOne({'folderId': ObjectId(folder['_id']),
'name': 'whole'})
'name': WHOLE_ITEM_NAME})
ret_data.append({
'id': whole_item['_id'],
'parent_id': folder['_id']
Expand Down Expand Up @@ -469,7 +469,7 @@ def save_user_annotation_as_item(user, item_id, done, reject, comment, color, cu
uname = user['login']
item = Item().findOne({'_id': ObjectId(item_id)})
whole_item = Item().findOne({'folderId': ObjectId(item['folderId']),
'name': 'whole'})
'name': WHOLE_ITEM_NAME})
if reject:
# reject the annotation
reject_assignment(user, item, whole_item, True, comment)
Expand Down Expand Up @@ -533,7 +533,7 @@ def save_user_review_result_as_item(user, item_id, done, reject, comment, approv
uname = user['login']
item = Item().findOne({'_id': ObjectId(item_id)})
whole_item = Item().findOne({'folderId': ObjectId(item['folderId']),
'name': 'whole'})
'name': WHOLE_ITEM_NAME})
if reject:
# reject the review assignment
reject_assignment(user, item, whole_item, False, comment, task='review')
Expand Down
3 changes: 2 additions & 1 deletion girder/plugins/ninjato_api/girder_ninjato_api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

COLLECTION_NAME = 'nuclei_image_collection'
TRAINING_COLLECTION_NAME = 'nuclei_image_training_collection'
WHOLE_ITEM_NAME = '_whole'
BUFFER_FACTOR = 3
DATA_PATH = '/girder/data'
ANNOT_ASSIGN_KEY = 'annotation_assigned_to'
Expand Down Expand Up @@ -280,7 +281,7 @@ def find_region_item_from_label(whole_item, region_label):

def get_region_extent(item, region_id, user_extent=True):
is_whole_item = False
if item['name'] == 'whole':
if item['name'] == WHOLE_ITEM_NAME:
is_whole_item = True
item_files = File().find({'itemId': item['_id']})
if user_extent:
Expand Down
Binary file modified girder/test_data.gz
Binary file not shown.

0 comments on commit 6eefc6c

Please sign in to comment.