-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor: use attributes #594
base: main
Are you sure you want to change the base?
Conversation
attn @AhmetNSimsek per our discussion, here is the WIP left to do: refactor todo list
|
|
@xgui3783, I think we should remove the This changes if the class has extra members. Then, it is needed to use the decorator as the |
@@ -107,13 +116,33 @@ def populate_regions( | |||
parent_region = _dict_id_to_region[parent_id] | |||
region.parent = parent_region | |||
|
|||
def tiff_to_nii(tiff_bytes: bytes, affine: np.ndarray) -> str: |
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.
I think this should go to commons_new.maps or we create a tiff fetcher.
I prefer the second one (EDT: tho it is difficult to assume tiffs are standard. We could make tiff.brainglobe_tiff_fetcher)
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.
as you alluded to, there is no standard tiff format.
That's why I think it should be here (i.e. brainglobe standard)
|
||
_registered_atlas.add(atlas_name) | ||
logger.info(f"{atlas_name} added to siibra.") | ||
|
||
return space, parcellation | ||
return space, parcellation, labelled_map |
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.
Just food for discussion: since a labelled_map has to have this space and parcellation as a member, or computed property, perhaps we should just return the map.
The user can then access to parcellation and space either from mp.parcellation/space
or from the registry
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.
I don't mind either way (I am also fine not returning anything)
The only reason why I return all three is to be explicit, to show all of the items that are added
To profile and improve:
Known bugs:
Other issues:(
@xgui3783 Please edit and add/update more as we move forward to keep track of finer details |
fix: point add/sub. space_id should not proxy for space_spec
…le image intersection
fix: location.ops.transform pointcloud test: fixed point coordinate type
fix: nifti dtype feat: find maps can allow None parcellation/space spec
maint: sparsemap.fetch (typing + logic rework) maint: image.py assertion block & space_id test
…nd_intersecting_regions`
workflow: add debug
feat: attribute_collection now exposes categorization as a human readable str feat: searchresult indexes categorizations when building summary table
fix: preprocess region
…ity) fix: big brain profile
maint: low ram/non local as perf default feat: append all dataop for volumes feat: query cursor data table & reconfigure
doc: live queries base class
fix (e2e): use correct error class feat: add siibra error class
refactor: (sparse)map.extract_full_map
feat: contain in enum
fix: merge label nifti data operation
doc: zip fetcher description test(e2e): fix bold, fix allen, fix image
supercedes #553
EDIT: The tests are turned off, except for the ones in examples_new to see if there is regression. The remaining test migration will be made gradually. (b70abe9 and 8a47f0f)
A list of issues this PR solves (Please add more moving forward):
region.get_regional_map
only returns the mask of the maps #602region.get_regional_map
cannot take higher granularity maps #601