-
Notifications
You must be signed in to change notification settings - Fork 0
Integration of VISIAN into DV #575
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
Open
Alorcus
wants to merge
84
commits into
develop-annotation-service
Choose a base branch
from
566-integration-of-visian-into-dv
base: develop-annotation-service
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
144845c
fix: remove unused attribute
Alorcus 8f3744d
feat: add annotationTask, annotation and annotationData
Alorcus 39337de
add: DVReviewTask and Strategy (boilerplate)
Alorcus e8b5973
chg: file structure
Alorcus 3931466
add: DVBackend (boilerplate)
Alorcus 0673144
Merge branch 'develop-annotation-service' into 566-integration-of-vis…
Alorcus a3475cf
add: remainder of dv schema
Alorcus db51c09
UNDO THIS COMMIT BEFORE PR! add: example files
Alorcus 21bc212
add: remaining attributes for schema export
Alorcus 73bb97b
chg: DvAnnotationGroup to DvAnnotationLayer, extended DV file structure
Alorcus 64822e8
add: zip ending recognition
Alorcus ee2fffe
add DV Strategy to root store
Alorcus 27f8b99
chg: extend file-types by DvMetadata
Alorcus fcd5e6d
add: loadTaskPostProcessing
Alorcus 704c5ac
Merge branch 'develop-annotation-service' into 566-integration-of-vis…
Alorcus b3b83d1
add: layerRoisEntry
Alorcus 579edee
add: drawROIS to post processing
Alorcus 1812a61
add: fillROI to post processing
Alorcus 9c0fb5f
chg: use specified color, remove default group
Alorcus 8878f94
add: import example
Alorcus 85db549
add: document parameter to function save Task
Alorcus 11ac43d
chg: generalization of the constructors
Alorcus e330497
add: export of DvTask
Alorcus 774cb1d
add: 'generate' annotation ids for new layers
Alorcus b5b7fbd
chg: export rois from all slices
Alorcus 7647230
add: export of layer color
Alorcus 0f8b8cd
chg: cleanup
Alorcus 8cfd6bf
Merge branch 'develop-annotation-service' into 566-integration-of-vis…
Alorcus d30a731
chg: clean up no. 2
Alorcus aa3fee0
fix: linting issues
Alorcus 87cd0b1
fix: linting issues
Alorcus ff3d38e
fix: linting issues
Alorcus ab56144
chg: ReviewTask to generic ReviewTask in ReviewStrategy
Alorcus c437417
chg: rename dvTask to dvAnnotationTask
Alorcus 22fa3b8
Update libs/utils/src/lib/backend/dv/types/annotationLayer.ts
Alorcus 4b36b01
Merge branch '566-integration-of-visian-into-dv' of https://github.co…
Alorcus dfacfbd
chg: constructer of dv objects
Alorcus c50a269
fix: import of Rois class
Alorcus fa3df48
chg: make method not abstract
Alorcus 244dc20
chg: rename and small adjustments
Alorcus f1bec14
chg: method order
Alorcus f4b3d51
fix: linting issue
Alorcus 1e6f908
fix: text overflow from page title, grid and list view items
Alorcus 08b491b
refactor: move CSS to general text, renamed components
Alorcus ddf8736
fix: overflow of confirmation popup
Alorcus 698b4de
build: add opencv.js dependency
TimRiedel 9ff649d
feat: fill contours of annotation slices (incl. donut shape)
TimRiedel 10c33d0
fix: fill roi contours without a child contour
TimRiedel f675ab7
feat: find contours in annotation slice and return them as points
TimRiedel 0f38e03
feat: draw contours from an array of coordinates
TimRiedel fa71c29
build: fix webpack 5 incompatibility for crypto and stream after addi…
TimRiedel 9ae3820
docs: add donut shape edge case to roi converter method description
TimRiedel dcf65dd
add: layerRoisEntry
Alorcus 7b8a451
add: drawROIS to post processing
Alorcus 344747c
add: fillROI to post processing
Alorcus 1f94891
chg: use specified color, remove default group
Alorcus 4e88ad5
add: import example
Alorcus 3848f55
add: document parameter to function save Task
Alorcus 7ff9661
chg: generalization of the constructors
Alorcus ca52344
add: export of DvTask
Alorcus 1c4aea0
add: 'generate' annotation ids for new layers
Alorcus 6521914
chg: export rois from all slices
Alorcus b571d94
add: export of layer color
Alorcus fb683b7
chg: cleanup
Alorcus 9d309aa
fix: add missing maxLength to project and dataset inputs
richartkeil fe9d4f9
chg: clean up no. 2
Alorcus 2618609
fix: linting issues
Alorcus 0aab42f
fix: linting issues
Alorcus d23cf33
fix: linting issues
Alorcus 65249b8
chg: ReviewTask to generic ReviewTask in ReviewStrategy
Alorcus e9343c5
chg: rename dvTask to dvAnnotationTask
Alorcus a6907b8
Update libs/utils/src/lib/backend/dv/types/annotationLayer.ts
Alorcus 5d59873
chg: constructer of dv objects
Alorcus 2be2a09
fix: import of Rois class
Alorcus cbd5f81
chg: make method not abstract
Alorcus e68de9c
chg: rename and small adjustments
Alorcus df8914a
chg: method order
Alorcus 26f59bf
fix: linting issue
Alorcus 95b77fc
Merge branch '566-integration-of-visian-into-dv' of https://github.co…
Alorcus d39d335
refactor: rename and document DV classes
TimRiedel 6e5e4a3
refactor: rename variables and functions in DV review task
TimRiedel 772f00e
refactor: mirror dv rois for import and export
TimRiedel 6e219fd
refactor: make contours of slice private
TimRiedel 1df633e
docs: add documentation for review strategy and review task
TimRiedel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
apps/editor/src/models/review-strategy/dv-review-strategy.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { getDvAnnotationTask, getTaskIdFromUrl } from "@visian/utils"; | ||
|
||
import { RootStore } from "../root"; | ||
import { DVReviewTask } from "./dv-review-task"; | ||
import { ReviewStrategy } from "./review-strategy"; | ||
import { ReviewStrategySnapshot } from "./review-strategy-snapshot"; | ||
|
||
export class DVReviewStrategy extends ReviewStrategy<DVReviewTask> { | ||
public static fromSnapshot( | ||
store: RootStore, | ||
snapshot?: ReviewStrategySnapshot, | ||
) { | ||
if (!snapshot) return undefined; | ||
if (snapshot.backend === "dv") { | ||
return new DVReviewStrategy({ | ||
store, | ||
currentReviewTask: snapshot.currentReviewTask | ||
? DVReviewTask.fromSnapshot(snapshot.currentReviewTask) | ||
: undefined, | ||
}); | ||
} | ||
return undefined; | ||
} | ||
|
||
constructor({ | ||
store, | ||
currentReviewTask, | ||
}: { | ||
store: RootStore; | ||
currentReviewTask?: DVReviewTask; | ||
}) { | ||
super({ store }); | ||
if (currentReviewTask) this.setCurrentTask(currentReviewTask); | ||
} | ||
|
||
public supportsPreviousTask(): boolean { | ||
return false; | ||
} | ||
|
||
public supportsNextTask(): boolean { | ||
return false; | ||
} | ||
|
||
public async nextTask(): Promise<void> { | ||
throw new Error("Next task is not implemented in the DV strategy!"); | ||
} | ||
|
||
public async previousTask() { | ||
throw new Error("Previous task is not implemented in the DV strategy!"); | ||
} | ||
|
||
public async saveTask(): Promise<void> { | ||
this.currentTask?.save(this.getDocument()); | ||
} | ||
|
||
protected async buildTask() { | ||
const taskId = getTaskIdFromUrl(); | ||
if (!taskId) throw new Error("No DV task specified in URL."); | ||
|
||
const dvAnnotationTask = await getDvAnnotationTask(taskId); | ||
|
||
if (!dvAnnotationTask) throw new Error("DV Task not found."); | ||
this.setCurrentTask(new DVReviewTask(dvAnnotationTask)); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
protected async importAnnotations(): Promise<void> {} | ||
|
||
public postProcessLoadedTask(): void { | ||
const document = this.getDocument(); | ||
if (this.currentTask) { | ||
this.currentTask.addGroupsAndLayers(document); | ||
} | ||
document.requestSave(); | ||
} | ||
|
||
public toJSON(): ReviewStrategySnapshot { | ||
return { | ||
backend: "dv", | ||
currentReviewTask: this.currentTask | ||
? this.currentTask.toJSON() | ||
: undefined, | ||
}; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.