Neuroglancer views
This is the module that the user will use to connect to the database. This can be defined in either a web page or in a REST API call. This module is the ‘V’ in the MVC framework for the Neuroglancer app portion of the portal.
- class neuroglancer.views.ContoursToVolume(**kwargs)
Method to run slurm to create a 3D volume
- get(request, url_id, volume_id)
- class neuroglancer.views.GetCOM(**kwargs)
A view that returns the COM for a perticular annotator in neuroglancer json format
- get(request, prep_id, annotator_id, source, format=None)
- class neuroglancer.views.GetCellTypes(**kwargs)
View that returns a list of cell types
- get(request, format=None)
- class neuroglancer.views.GetComList(**kwargs)
A view that returns a list of available COMs.
- get(request, format=None)
This will get the layers of COMs for the dropdown menu
- class neuroglancer.views.GetMarkedCell(**kwargs)
A view that returns the marked cells for a specific annotation session in neuroglancer json format.
- get(request, session_id, format=None)
- class neuroglancer.views.GetMarkedCellList(**kwargs)
A view that returns a list of available marked cell annotations.
- get(request, format=None)
This will get the layer_data for the marked cell requested
- class neuroglancer.views.GetPolygonList(**kwargs)
A view that returns a list of available brain region volumes.
- get(request, format=None)
This will get the layer_data
- class neuroglancer.views.GetVolume(**kwargs)
A view that returns the volume annotation for a session in neuroglancer json format
- create_polygon_and_volume_uuids(rows)
- get(request, session_id, format=None)
- class neuroglancer.views.LandmarkList(**kwargs)
A view that returns a list of active brain regions in the structures table.
- get(request, format=None)
- class neuroglancer.views.Rotation(**kwargs)
A view that returns the transformation from the atlas to the image stack of one particular brain.
- get(request, prep_id, annotator_id, source, reverse=0, reference_scales='None', format=None)
- class neuroglancer.views.Rotations(**kwargs)
A view that returns the available set of rotations.
- get(request, format=None)
- class neuroglancer.views.SaveAnnotation(**kwargs)
A view that saves all the annotation in one annotation layer of a specific row in the neuroglancer url table There are two methods to save the data, one is in the background and the other is the default way without using the background process. We use the background task in production as the method can take a long time to complete.
- get(request, url_id, annotation_layer_name)
- class neuroglancer.views.UrlViewSet(**kwargs)
API endpoint that allows the neuroglancer urls to be viewed or edited.
- permission_classes = [<class 'rest_framework.permissions.AllowAny'>]
- queryset
- serializer_class
alias of
UrlSerializer
- neuroglancer.views.apply_scales_to_annotation_rows(rows, prep_id)
To fetch the scan resolution of an animal from the database and apply it to a list of annotation rows
- Parameters
rows – list of query result from either the StructureCom, MarkedCell, or PolygonSequence table.
prep_id – string animal id