-
Notifications
You must be signed in to change notification settings - Fork 29
Calculate surface area of segments #8928
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
Changes from 30 commits
6ac57c6
61c71a2
710d52e
40a8ce4
00b458a
dbd3335
18e2409
7d56a1a
6dfe14c
cc95bbe
d55e5a2
bad0855
2ea2456
ae62338
ee138b3
9940941
3172698
9855846
0e6f1ea
9af5488
82400f7
b65aa32
7d22add
c61dbca
e9ec82e
90bcfef
fa7ef22
00d68aa
d1cb2bc
a02d99b
299c8e3
10cfcdd
f39564b
7b44303
1cb016a
2c684cd
89ed12c
b566e1c
a8d15ef
c6aa9f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,6 +161,16 @@ class WKRemoteTracingStoreController @Inject()(tracingStoreService: TracingStore | |
| } | ||
| } | ||
|
|
||
| def getDataSource(name: String, key: String, datasetId: ObjectId): Action[AnyContent] = | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This route is only used to retrieve the voxelsize If am not incorrect. Maybe we could instead implement a Moreover, maybe the access checking via a DB context and a passed accesstoken in the request could be better. Just as coderabbit is indicating. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it’s fine. The tracingstore needs to be authenticated anyway, and it doesn’t give any of this info to the user. |
||
| Action.async { implicit request => | ||
| tracingStoreService.validateAccess(name, key) { _ => | ||
| for { | ||
| dataset <- datasetDAO.findOne(datasetId)(GlobalAccessContext) ?~> "dataset.notFound" ~> NOT_FOUND | ||
fm3 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| dataSource <- datasetService.dataSourceFor(dataset) | ||
| } yield Ok(Json.toJson(dataSource)) | ||
| } | ||
| } | ||
fm3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| def createTracing(name: String, | ||
| key: String, | ||
| annotationId: ObjectId, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -879,6 +879,41 @@ export function getSegmentVolumes( | |
| ); | ||
| } | ||
|
|
||
| type SegmentStatisticsParametersMeshBased = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rename this to |
||
| mag: Vector3; | ||
| segmentIds: number[]; | ||
| mappingName?: string | null; | ||
| additionalCoordinates?: AdditionalCoordinate[] | null; | ||
| meshFileName?: string | null; | ||
| }; | ||
|
|
||
| export function getSegmentSurfaceArea( | ||
| layerSourceInfo: LayerSourceInfo, | ||
| mag: Vector3, | ||
| meshFileName: string | undefined | null, | ||
| segmentIds: Array<number>, | ||
| additionalCoordinates: AdditionalCoordinate[] | undefined | null, | ||
| mappingName: string | null | undefined, | ||
| ): Promise<number[]> { | ||
| const requestUrl = getDataOrTracingStoreUrl(layerSourceInfo); | ||
| return doWithToken((token) => { | ||
| const data: SegmentStatisticsParametersMeshBased = { | ||
| mag, | ||
| segmentIds, | ||
| mappingName, | ||
| additionalCoordinates, | ||
| meshFileName, | ||
| }; | ||
| return Request.sendJSONReceiveJSON( | ||
| `${requestUrl}/segmentStatistics/surfaceArea?token=${token}`, | ||
| { | ||
| data, | ||
| method: "POST", | ||
| }, | ||
| ); | ||
| }); | ||
| } | ||
|
|
||
| export function getSegmentBoundingBoxes( | ||
| layerSourceInfo: LayerSourceInfo, | ||
| mag: Vector3, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.