-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
executable file
·135 lines (118 loc) · 3.31 KB
/
index.d.ts
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
type CodecTypeDefinitions =
import("./CodecTypeDefinitions").CodecTypeDefinitions;
type DicomDefinitions = import("./DicomDefinitions").DicomDefinitions;
type TagVRDefinitions = import("./TagVRDefinitions").TagVRDefinitions;
type AgeUnitDefinitions = import("./AgeUnitDefinitions").AgeUnitDefinitions;
class CodecFactory {
static setMaximumImageSize(w: number, h: number): void;
static load(file: string): DataSet;
static save(set: DataSet, out: string, codecType: CodecTypeDefinitions): void;
}
export interface ITag {
tagId: number;
groupOrder: number;
groupId: number;
}
class Tag {
constructor(dataSet: DataSet, tagId: TagId);
getDataType(): TagVRDefinitions;
sequenceItemExists(dataSetId: number): boolean;
getBuffersCount(): number;
bufferExists(bufferId: number): boolean;
}
class TagId {
constructor(tagId: number): void;
constructor(groupId: number, tagId: number): void;
/**
* not supported yet
*/
constructor(groupId: number, groupOrder: number, tagId: number): void;
getTagId(): number;
getGroupOrder(): number;
getGroupId(): number;
}
class Age {
getAgeUnits(): string;
getAgeValue(): number;
}
class Image {
getWidth(): number;
}
class VOIDescription {
getDescription(): string;
}
class DataSet {
getTags(): TagId[];
getImageApplyModalityTransform(frameNumber: number): Image;
getImage(frameNumber: number): Image;
getTag(tagId: TagId): Tag;
getVOIs(): VOIDescription[];
bufferExists(tagId: TagId, bufferId: number): boolean;
getAge(tagId: TagId, elementNumber: number): Age;
getString(tag: TagId, elementNumber: number, defaultValue?: string): string;
getInt32(tag: TagId, elementNumber: number, defaultValue?: number): number;
getInt64(tag: TagId, elementNumber: number): number;
getUint32(tag: TagId, elementNumber: number, defaultValue?: number): number;
getPatientName(tagId: TagId, elementNumber: number): PatientName;
getDate(tagId: TagId, elementNumber: number): Date;
}
class Date {
getYear(): number;
getMinutes(): number;
getDay(): number;
getMonth(): number;
getSeconds(): number;
getNanoseconds(): number;
getOffsetHours(): number;
getOffsetMinutes(): number;
getHour(): number;
}
class PatientName {
getAlphabeticRepresentation(): string;
}
class DicomDirEntry {
hasNextEntry(): boolean;
getNextEntry(): DicomDirEntry;
}
class DicomDir {
constructor(dataSet: DataSet);
hasRootEntry(): boolean;
getFirstRootEntry(): DicomDirEntry;
}
const constants: {
codecType_t: typeof import("./CodecTypeDefinitions").CodecTypeDefinitions;
tagVR_t: typeof import("./TagVRDefinitions").TagVRDefinitions;
tagId_t: typeof import("./DicomDefinitions").DicomDefinitions;
ageUnit_t: typeof import("./AgeUnitDefinitions").AgeUnitDefinitions;
};
class ArchiveEntry {
pathname(): string;
}
class ArchiveRead {
openFilename(filename: string, size: number): boolean;
readDataBlock(): ArrayBuffer | null;
supportFormatAll(): boolean;
supportFilterAll(): boolean;
nextHeader(): ArchiveEntry | null;
}
class DicomDictionary {
static getTagDescription(tagId: TagId): string;
static getTagType(tagId: TagId): TagVRDefinitions;
}
export default {
constants,
CodecFactory,
Tag,
TagId,
Age,
Image,
VOIDescription,
DataSet,
Date,
PatientName,
DicomDirEntry,
DicomDir,
ArchiveEntry,
ArchiveRead,
DicomDictionary,
};