@niivue/dicom-loader
Version:
a module to load DICOM files into a format that can be used by niivue
20 lines (18 loc) • 625 B
text/typescript
interface DicomInput {
name: string;
data: ArrayBuffer;
}
interface ConvertedFile {
name: string;
data: ArrayBuffer;
}
/**
* Loads DICOM files (or a single DICOM file) and converts them to
* NIfTI using dcm2niix in the browser.
*
* @param data - An array of File objects or an array of DicomInput objects.
* @returns A promise that resolves to an array of { name, data }
* where each data field is an ArrayBuffer containing the NIfTI file.
*/
declare function dicomLoader(data: Array<File | DicomInput>): Promise<ConvertedFile[]>;
export { type ConvertedFile, type DicomInput, dicomLoader };