File size: 1,088 Bytes
497bb49 fbf73ff 497bb49 fbf73ff 497bb49 fbf73ff 497bb49 fbf73ff 497bb49 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
// Segmentation metrics
export interface Metrics {
caseId: string
diceScore: number | null
volumeMl: number | null
elapsedSeconds: number
}
// Final segmentation result with URLs and metrics
export interface SegmentationResult {
dwiUrl: string
predictionUrl: string
metrics: Metrics
}
// API Response Types
export interface CasesResponse {
cases: string[]
}
// Segmentation result data (embedded in job response)
export interface SegmentResponse {
caseId: string
diceScore: number | null
volumeMl: number | null
elapsedSeconds: number
dwiUrl: string
predictionUrl: string
}
// Job Status Types
export type JobStatus = 'pending' | 'running' | 'completed' | 'failed'
// Response from POST /api/segment (job creation)
export interface CreateJobResponse {
jobId: string
status: JobStatus
message: string
}
// Response from GET /api/jobs/{jobId} (status polling)
export interface JobStatusResponse {
jobId: string
status: JobStatus
progress: number
progressMessage: string
elapsedSeconds?: number
result?: SegmentResponse
error?: string
}
|