@ubercode/dcmtk 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +18 -15
- package/dist/DicomInstance-By9zd7GM.d.cts +625 -0
- package/dist/DicomInstance-CQEIuF_x.d.ts +625 -0
- package/dist/{dcmodify-CTXBWKU9.d.cts → dcmodify-B-_uUIKB.d.ts} +4 -2
- package/dist/{dcmodify-Daeafqrm.d.ts → dcmodify-Gds9u5Vj.d.cts} +4 -2
- package/dist/dicom.cjs +329 -51
- package/dist/dicom.cjs.map +1 -1
- package/dist/dicom.d.cts +368 -3
- package/dist/dicom.d.ts +368 -3
- package/dist/dicom.js +329 -51
- package/dist/dicom.js.map +1 -1
- package/dist/index.cjs +1460 -419
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +1432 -413
- package/dist/index.js.map +1 -1
- package/dist/servers.cjs +2379 -196
- package/dist/servers.cjs.map +1 -1
- package/dist/servers.d.cts +1654 -3
- package/dist/servers.d.ts +1654 -3
- package/dist/servers.js +2305 -145
- package/dist/servers.js.map +1 -1
- package/dist/tools.cjs +97 -50
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +21 -4
- package/dist/tools.d.ts +21 -4
- package/dist/tools.js +97 -51
- package/dist/tools.js.map +1 -1
- package/dist/{types-zHhxS7d2.d.cts → types-Cgumy1N4.d.cts} +1 -24
- package/dist/{types-zHhxS7d2.d.ts → types-Cgumy1N4.d.ts} +1 -24
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +8 -8
- package/dist/index-BZxi4104.d.ts +0 -826
- package/dist/index-CapkWqxy.d.ts +0 -1295
- package/dist/index-DX4C3zbo.d.cts +0 -826
- package/dist/index-r7AvpkCE.d.cts +0 -1295
package/dist/tools.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as Result } from './types-
|
|
2
|
-
import { d as ToolBaseOptions, c as DicomJsonModel } from './dcmodify-
|
|
3
|
-
export {
|
|
1
|
+
import { R as Result } from './types-Cgumy1N4.cjs';
|
|
2
|
+
import { d as ToolBaseOptions, c as DicomJsonModel } from './dcmodify-Gds9u5Vj.cjs';
|
|
3
|
+
export { a as DcmodifyOptions, b as DcmodifyResult, D as DicomJsonElement, T as TagModification, e as dcmodify } from './dcmodify-Gds9u5Vj.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* DICOM to XML conversion using the dcm2xml binary.
|
|
@@ -1304,6 +1304,21 @@ declare function dcmsend(options: DcmsendOptions): Promise<Result<DcmsendResult>
|
|
|
1304
1304
|
* @module storescu
|
|
1305
1305
|
*/
|
|
1306
1306
|
|
|
1307
|
+
/** Proposed transfer syntax for outgoing C-STORE associations. */
|
|
1308
|
+
declare const ProposedTransferSyntax: {
|
|
1309
|
+
readonly UNCOMPRESSED: "uncompressed";
|
|
1310
|
+
readonly LITTLE_ENDIAN: "littleEndian";
|
|
1311
|
+
readonly BIG_ENDIAN: "bigEndian";
|
|
1312
|
+
readonly IMPLICIT_VR: "implicitVR";
|
|
1313
|
+
readonly JPEG_LOSSLESS: "jpegLossless";
|
|
1314
|
+
readonly JPEG_8BIT: "jpeg8Bit";
|
|
1315
|
+
readonly JPEG_12BIT: "jpeg12Bit";
|
|
1316
|
+
readonly J2K_LOSSLESS: "j2kLossless";
|
|
1317
|
+
readonly J2K_LOSSY: "j2kLossy";
|
|
1318
|
+
readonly JLS_LOSSLESS: "jlsLossless";
|
|
1319
|
+
readonly JLS_LOSSY: "jlsLossy";
|
|
1320
|
+
};
|
|
1321
|
+
type ProposedTransferSyntaxValue = (typeof ProposedTransferSyntax)[keyof typeof ProposedTransferSyntax];
|
|
1307
1322
|
/** Options for {@link storescu}. */
|
|
1308
1323
|
interface StorescuOptions extends ToolBaseOptions {
|
|
1309
1324
|
/** Remote host or IP address. */
|
|
@@ -1320,6 +1335,8 @@ interface StorescuOptions extends ToolBaseOptions {
|
|
|
1320
1335
|
readonly scanDirectories?: boolean | undefined;
|
|
1321
1336
|
/** Recurse into subdirectories (requires scanDirectories). */
|
|
1322
1337
|
readonly recurse?: boolean | undefined;
|
|
1338
|
+
/** Proposed transfer syntax for the association. */
|
|
1339
|
+
readonly proposedTransferSyntax?: ProposedTransferSyntaxValue | undefined;
|
|
1323
1340
|
}
|
|
1324
1341
|
/** Result of a successful C-STORE send. */
|
|
1325
1342
|
interface StorescuResult {
|
|
@@ -2001,4 +2018,4 @@ interface DcmmklutResult {
|
|
|
2001
2018
|
*/
|
|
2002
2019
|
declare function dcmmklut(outputPath: string, options?: DcmmklutOptions): Promise<Result<DcmmklutResult>>;
|
|
2003
2020
|
|
|
2004
|
-
export { type Cda2dcmOptions, type Cda2dcmResult, ColorConversion, type ColorConversionValue, type Dcm2cdaOptions, type Dcm2cdaResult, type Dcm2jsonOptions, type Dcm2jsonResult, type Dcm2jsonSource, type Dcm2pdfOptions, type Dcm2pdfResult, type Dcm2pnmOptions, Dcm2pnmOutputFormat, type Dcm2pnmOutputFormatValue, type Dcm2pnmResult, Dcm2xmlCharset, type Dcm2xmlCharsetValue, type Dcm2xmlOptions, type Dcm2xmlResult, type DcmcjpegOptions, type DcmcjpegResult, type DcmcjplsOptions, type DcmcjplsResult, type DcmconvOptions, type DcmconvResult, type DcmcrleOptions, type DcmcrleResult, type DcmdecapOptions, type DcmdecapResult, type DcmdjpegOptions, type DcmdjpegResult, type DcmdjplsOptions, type DcmdjplsResult, type DcmdrleOptions, type DcmdrleResult, type DcmdspfnOptions, type DcmdspfnResult, DcmdumpFormat, type DcmdumpFormatValue, type DcmdumpOptions, type DcmdumpResult, type DcmencapOptions, type DcmencapResult, type DcmftestOptions, type DcmftestResult, type DcmgpdirOptions, type DcmgpdirResult, type Dcmj2pnmOptions, Dcmj2pnmOutputFormat, type Dcmj2pnmOutputFormatValue, type Dcmj2pnmResult, type DcmmkcrvOptions, type DcmmkcrvResult, type DcmmkdirOptions, type DcmmkdirResult, type DcmmklutOptions, type DcmmklutResult, type Dcmp2pgmOptions, type Dcmp2pgmResult, type DcmprscuOptions, type DcmprscuResult, type DcmpschkOptions, type DcmpschkResult, type DcmpsmkOptions, type DcmpsmkResult, type DcmpsprtOptions, type DcmpsprtResult, type DcmqridxOptions, type DcmqridxResult, type DcmquantOptions, type DcmquantResult, type DcmscaleOptions, type DcmscaleResult, type DcmsendOptions, type DcmsendResult, type Dcod2lumOptions, type Dcod2lumResult, type DconvlumOptions, type DconvlumResult, DicomJsonModel, type DrtdumpOptions, type DrtdumpResult, type Dsr2xmlOptions, type Dsr2xmlResult, type DsrdumpOptions, type DsrdumpResult, type Dump2dcmOptions, type Dump2dcmResult, type EchoscuOptions, type EchoscuResult, type FindscuOptions, type FindscuResult, GetQueryModel, type GetQueryModelValue, type GetscuOptions, type GetscuResult, Img2dcmInputFormat, type Img2dcmInputFormatValue, type Img2dcmOptions, type Img2dcmResult, JplsColorConversion, type JplsColorConversionValue, type Json2dcmOptions, type Json2dcmResult, LutType, type LutTypeValue, MoveQueryModel, type MoveQueryModelValue, type MovescuOptions, type MovescuResult, type Pdf2dcmOptions, type Pdf2dcmResult, QueryModel, type QueryModelValue, type Stl2dcmOptions, type Stl2dcmResult, type StorescuOptions, type StorescuResult, type TermscuOptions, type TermscuResult, ToolBaseOptions, TransferSyntax, type TransferSyntaxValue, type Xml2dcmOptions, type Xml2dcmResult, type Xml2dsrOptions, type Xml2dsrResult, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr };
|
|
2021
|
+
export { type Cda2dcmOptions, type Cda2dcmResult, ColorConversion, type ColorConversionValue, type Dcm2cdaOptions, type Dcm2cdaResult, type Dcm2jsonOptions, type Dcm2jsonResult, type Dcm2jsonSource, type Dcm2pdfOptions, type Dcm2pdfResult, type Dcm2pnmOptions, Dcm2pnmOutputFormat, type Dcm2pnmOutputFormatValue, type Dcm2pnmResult, Dcm2xmlCharset, type Dcm2xmlCharsetValue, type Dcm2xmlOptions, type Dcm2xmlResult, type DcmcjpegOptions, type DcmcjpegResult, type DcmcjplsOptions, type DcmcjplsResult, type DcmconvOptions, type DcmconvResult, type DcmcrleOptions, type DcmcrleResult, type DcmdecapOptions, type DcmdecapResult, type DcmdjpegOptions, type DcmdjpegResult, type DcmdjplsOptions, type DcmdjplsResult, type DcmdrleOptions, type DcmdrleResult, type DcmdspfnOptions, type DcmdspfnResult, DcmdumpFormat, type DcmdumpFormatValue, type DcmdumpOptions, type DcmdumpResult, type DcmencapOptions, type DcmencapResult, type DcmftestOptions, type DcmftestResult, type DcmgpdirOptions, type DcmgpdirResult, type Dcmj2pnmOptions, Dcmj2pnmOutputFormat, type Dcmj2pnmOutputFormatValue, type Dcmj2pnmResult, type DcmmkcrvOptions, type DcmmkcrvResult, type DcmmkdirOptions, type DcmmkdirResult, type DcmmklutOptions, type DcmmklutResult, type Dcmp2pgmOptions, type Dcmp2pgmResult, type DcmprscuOptions, type DcmprscuResult, type DcmpschkOptions, type DcmpschkResult, type DcmpsmkOptions, type DcmpsmkResult, type DcmpsprtOptions, type DcmpsprtResult, type DcmqridxOptions, type DcmqridxResult, type DcmquantOptions, type DcmquantResult, type DcmscaleOptions, type DcmscaleResult, type DcmsendOptions, type DcmsendResult, type Dcod2lumOptions, type Dcod2lumResult, type DconvlumOptions, type DconvlumResult, DicomJsonModel, type DrtdumpOptions, type DrtdumpResult, type Dsr2xmlOptions, type Dsr2xmlResult, type DsrdumpOptions, type DsrdumpResult, type Dump2dcmOptions, type Dump2dcmResult, type EchoscuOptions, type EchoscuResult, type FindscuOptions, type FindscuResult, GetQueryModel, type GetQueryModelValue, type GetscuOptions, type GetscuResult, Img2dcmInputFormat, type Img2dcmInputFormatValue, type Img2dcmOptions, type Img2dcmResult, JplsColorConversion, type JplsColorConversionValue, type Json2dcmOptions, type Json2dcmResult, LutType, type LutTypeValue, MoveQueryModel, type MoveQueryModelValue, type MovescuOptions, type MovescuResult, type Pdf2dcmOptions, type Pdf2dcmResult, ProposedTransferSyntax, type ProposedTransferSyntaxValue, QueryModel, type QueryModelValue, type Stl2dcmOptions, type Stl2dcmResult, type StorescuOptions, type StorescuResult, type TermscuOptions, type TermscuResult, ToolBaseOptions, TransferSyntax, type TransferSyntaxValue, type Xml2dcmOptions, type Xml2dcmResult, type Xml2dsrOptions, type Xml2dsrResult, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr };
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as Result } from './types-
|
|
2
|
-
import { d as ToolBaseOptions, c as DicomJsonModel } from './dcmodify-
|
|
3
|
-
export {
|
|
1
|
+
import { R as Result } from './types-Cgumy1N4.js';
|
|
2
|
+
import { d as ToolBaseOptions, c as DicomJsonModel } from './dcmodify-B-_uUIKB.js';
|
|
3
|
+
export { a as DcmodifyOptions, b as DcmodifyResult, D as DicomJsonElement, T as TagModification, e as dcmodify } from './dcmodify-B-_uUIKB.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* DICOM to XML conversion using the dcm2xml binary.
|
|
@@ -1304,6 +1304,21 @@ declare function dcmsend(options: DcmsendOptions): Promise<Result<DcmsendResult>
|
|
|
1304
1304
|
* @module storescu
|
|
1305
1305
|
*/
|
|
1306
1306
|
|
|
1307
|
+
/** Proposed transfer syntax for outgoing C-STORE associations. */
|
|
1308
|
+
declare const ProposedTransferSyntax: {
|
|
1309
|
+
readonly UNCOMPRESSED: "uncompressed";
|
|
1310
|
+
readonly LITTLE_ENDIAN: "littleEndian";
|
|
1311
|
+
readonly BIG_ENDIAN: "bigEndian";
|
|
1312
|
+
readonly IMPLICIT_VR: "implicitVR";
|
|
1313
|
+
readonly JPEG_LOSSLESS: "jpegLossless";
|
|
1314
|
+
readonly JPEG_8BIT: "jpeg8Bit";
|
|
1315
|
+
readonly JPEG_12BIT: "jpeg12Bit";
|
|
1316
|
+
readonly J2K_LOSSLESS: "j2kLossless";
|
|
1317
|
+
readonly J2K_LOSSY: "j2kLossy";
|
|
1318
|
+
readonly JLS_LOSSLESS: "jlsLossless";
|
|
1319
|
+
readonly JLS_LOSSY: "jlsLossy";
|
|
1320
|
+
};
|
|
1321
|
+
type ProposedTransferSyntaxValue = (typeof ProposedTransferSyntax)[keyof typeof ProposedTransferSyntax];
|
|
1307
1322
|
/** Options for {@link storescu}. */
|
|
1308
1323
|
interface StorescuOptions extends ToolBaseOptions {
|
|
1309
1324
|
/** Remote host or IP address. */
|
|
@@ -1320,6 +1335,8 @@ interface StorescuOptions extends ToolBaseOptions {
|
|
|
1320
1335
|
readonly scanDirectories?: boolean | undefined;
|
|
1321
1336
|
/** Recurse into subdirectories (requires scanDirectories). */
|
|
1322
1337
|
readonly recurse?: boolean | undefined;
|
|
1338
|
+
/** Proposed transfer syntax for the association. */
|
|
1339
|
+
readonly proposedTransferSyntax?: ProposedTransferSyntaxValue | undefined;
|
|
1323
1340
|
}
|
|
1324
1341
|
/** Result of a successful C-STORE send. */
|
|
1325
1342
|
interface StorescuResult {
|
|
@@ -2001,4 +2018,4 @@ interface DcmmklutResult {
|
|
|
2001
2018
|
*/
|
|
2002
2019
|
declare function dcmmklut(outputPath: string, options?: DcmmklutOptions): Promise<Result<DcmmklutResult>>;
|
|
2003
2020
|
|
|
2004
|
-
export { type Cda2dcmOptions, type Cda2dcmResult, ColorConversion, type ColorConversionValue, type Dcm2cdaOptions, type Dcm2cdaResult, type Dcm2jsonOptions, type Dcm2jsonResult, type Dcm2jsonSource, type Dcm2pdfOptions, type Dcm2pdfResult, type Dcm2pnmOptions, Dcm2pnmOutputFormat, type Dcm2pnmOutputFormatValue, type Dcm2pnmResult, Dcm2xmlCharset, type Dcm2xmlCharsetValue, type Dcm2xmlOptions, type Dcm2xmlResult, type DcmcjpegOptions, type DcmcjpegResult, type DcmcjplsOptions, type DcmcjplsResult, type DcmconvOptions, type DcmconvResult, type DcmcrleOptions, type DcmcrleResult, type DcmdecapOptions, type DcmdecapResult, type DcmdjpegOptions, type DcmdjpegResult, type DcmdjplsOptions, type DcmdjplsResult, type DcmdrleOptions, type DcmdrleResult, type DcmdspfnOptions, type DcmdspfnResult, DcmdumpFormat, type DcmdumpFormatValue, type DcmdumpOptions, type DcmdumpResult, type DcmencapOptions, type DcmencapResult, type DcmftestOptions, type DcmftestResult, type DcmgpdirOptions, type DcmgpdirResult, type Dcmj2pnmOptions, Dcmj2pnmOutputFormat, type Dcmj2pnmOutputFormatValue, type Dcmj2pnmResult, type DcmmkcrvOptions, type DcmmkcrvResult, type DcmmkdirOptions, type DcmmkdirResult, type DcmmklutOptions, type DcmmklutResult, type Dcmp2pgmOptions, type Dcmp2pgmResult, type DcmprscuOptions, type DcmprscuResult, type DcmpschkOptions, type DcmpschkResult, type DcmpsmkOptions, type DcmpsmkResult, type DcmpsprtOptions, type DcmpsprtResult, type DcmqridxOptions, type DcmqridxResult, type DcmquantOptions, type DcmquantResult, type DcmscaleOptions, type DcmscaleResult, type DcmsendOptions, type DcmsendResult, type Dcod2lumOptions, type Dcod2lumResult, type DconvlumOptions, type DconvlumResult, DicomJsonModel, type DrtdumpOptions, type DrtdumpResult, type Dsr2xmlOptions, type Dsr2xmlResult, type DsrdumpOptions, type DsrdumpResult, type Dump2dcmOptions, type Dump2dcmResult, type EchoscuOptions, type EchoscuResult, type FindscuOptions, type FindscuResult, GetQueryModel, type GetQueryModelValue, type GetscuOptions, type GetscuResult, Img2dcmInputFormat, type Img2dcmInputFormatValue, type Img2dcmOptions, type Img2dcmResult, JplsColorConversion, type JplsColorConversionValue, type Json2dcmOptions, type Json2dcmResult, LutType, type LutTypeValue, MoveQueryModel, type MoveQueryModelValue, type MovescuOptions, type MovescuResult, type Pdf2dcmOptions, type Pdf2dcmResult, QueryModel, type QueryModelValue, type Stl2dcmOptions, type Stl2dcmResult, type StorescuOptions, type StorescuResult, type TermscuOptions, type TermscuResult, ToolBaseOptions, TransferSyntax, type TransferSyntaxValue, type Xml2dcmOptions, type Xml2dcmResult, type Xml2dsrOptions, type Xml2dsrResult, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr };
|
|
2021
|
+
export { type Cda2dcmOptions, type Cda2dcmResult, ColorConversion, type ColorConversionValue, type Dcm2cdaOptions, type Dcm2cdaResult, type Dcm2jsonOptions, type Dcm2jsonResult, type Dcm2jsonSource, type Dcm2pdfOptions, type Dcm2pdfResult, type Dcm2pnmOptions, Dcm2pnmOutputFormat, type Dcm2pnmOutputFormatValue, type Dcm2pnmResult, Dcm2xmlCharset, type Dcm2xmlCharsetValue, type Dcm2xmlOptions, type Dcm2xmlResult, type DcmcjpegOptions, type DcmcjpegResult, type DcmcjplsOptions, type DcmcjplsResult, type DcmconvOptions, type DcmconvResult, type DcmcrleOptions, type DcmcrleResult, type DcmdecapOptions, type DcmdecapResult, type DcmdjpegOptions, type DcmdjpegResult, type DcmdjplsOptions, type DcmdjplsResult, type DcmdrleOptions, type DcmdrleResult, type DcmdspfnOptions, type DcmdspfnResult, DcmdumpFormat, type DcmdumpFormatValue, type DcmdumpOptions, type DcmdumpResult, type DcmencapOptions, type DcmencapResult, type DcmftestOptions, type DcmftestResult, type DcmgpdirOptions, type DcmgpdirResult, type Dcmj2pnmOptions, Dcmj2pnmOutputFormat, type Dcmj2pnmOutputFormatValue, type Dcmj2pnmResult, type DcmmkcrvOptions, type DcmmkcrvResult, type DcmmkdirOptions, type DcmmkdirResult, type DcmmklutOptions, type DcmmklutResult, type Dcmp2pgmOptions, type Dcmp2pgmResult, type DcmprscuOptions, type DcmprscuResult, type DcmpschkOptions, type DcmpschkResult, type DcmpsmkOptions, type DcmpsmkResult, type DcmpsprtOptions, type DcmpsprtResult, type DcmqridxOptions, type DcmqridxResult, type DcmquantOptions, type DcmquantResult, type DcmscaleOptions, type DcmscaleResult, type DcmsendOptions, type DcmsendResult, type Dcod2lumOptions, type Dcod2lumResult, type DconvlumOptions, type DconvlumResult, DicomJsonModel, type DrtdumpOptions, type DrtdumpResult, type Dsr2xmlOptions, type Dsr2xmlResult, type DsrdumpOptions, type DsrdumpResult, type Dump2dcmOptions, type Dump2dcmResult, type EchoscuOptions, type EchoscuResult, type FindscuOptions, type FindscuResult, GetQueryModel, type GetQueryModelValue, type GetscuOptions, type GetscuResult, Img2dcmInputFormat, type Img2dcmInputFormatValue, type Img2dcmOptions, type Img2dcmResult, JplsColorConversion, type JplsColorConversionValue, type Json2dcmOptions, type Json2dcmResult, LutType, type LutTypeValue, MoveQueryModel, type MoveQueryModelValue, type MovescuOptions, type MovescuResult, type Pdf2dcmOptions, type Pdf2dcmResult, ProposedTransferSyntax, type ProposedTransferSyntaxValue, QueryModel, type QueryModelValue, type Stl2dcmOptions, type Stl2dcmResult, type StorescuOptions, type StorescuResult, type TermscuOptions, type TermscuResult, ToolBaseOptions, TransferSyntax, type TransferSyntaxValue, type Xml2dcmOptions, type Xml2dcmResult, type Xml2dsrOptions, type Xml2dsrResult, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr };
|
package/dist/tools.js
CHANGED
|
@@ -273,7 +273,7 @@ function buildArgs(inputPath, options) {
|
|
|
273
273
|
async function dcm2xml(inputPath, options) {
|
|
274
274
|
const validation = Dcm2xmlOptionsSchema.safeParse(options);
|
|
275
275
|
if (!validation.success) {
|
|
276
|
-
return err(
|
|
276
|
+
return err(createValidationError("dcm2xml", validation.error));
|
|
277
277
|
}
|
|
278
278
|
const binaryResult = resolveBinary("dcm2xml");
|
|
279
279
|
if (!binaryResult.ok) {
|
|
@@ -588,7 +588,7 @@ function buildArgs2(inputPath, options) {
|
|
|
588
588
|
async function dcmdump(inputPath, options) {
|
|
589
589
|
const validation = DcmdumpOptionsSchema.safeParse(options);
|
|
590
590
|
if (!validation.success) {
|
|
591
|
-
return err(
|
|
591
|
+
return err(createValidationError("dcmdump", validation.error));
|
|
592
592
|
}
|
|
593
593
|
const binaryResult = resolveBinary("dcmdump");
|
|
594
594
|
if (!binaryResult.ok) {
|
|
@@ -633,7 +633,7 @@ var DcmconvOptionsSchema = z.object({
|
|
|
633
633
|
async function dcmconv(inputPath, outputPath, options) {
|
|
634
634
|
const validation = DcmconvOptionsSchema.safeParse(options);
|
|
635
635
|
if (!validation.success) {
|
|
636
|
-
return err(
|
|
636
|
+
return err(createValidationError("dcmconv", validation.error));
|
|
637
637
|
}
|
|
638
638
|
const binaryResult = resolveBinary("dcmconv");
|
|
639
639
|
if (!binaryResult.ok) {
|
|
@@ -665,7 +665,8 @@ var DcmodifyOptionsSchema = z.object({
|
|
|
665
665
|
erasures: z.array(z.string()).optional(),
|
|
666
666
|
erasePrivateTags: z.boolean().optional(),
|
|
667
667
|
noBackup: z.boolean().optional(),
|
|
668
|
-
insertIfMissing: z.boolean().optional()
|
|
668
|
+
insertIfMissing: z.boolean().optional(),
|
|
669
|
+
ignoreMissingTags: z.boolean().optional()
|
|
669
670
|
}).strict().refine((data) => data.modifications.length > 0 || data.erasures !== void 0 && data.erasures.length > 0 || data.erasePrivateTags === true, {
|
|
670
671
|
message: "At least one of modifications, erasures, or erasePrivateTags is required"
|
|
671
672
|
});
|
|
@@ -674,6 +675,9 @@ function buildArgs3(inputPath, options) {
|
|
|
674
675
|
if (options.noBackup !== false) {
|
|
675
676
|
args.push("-nb");
|
|
676
677
|
}
|
|
678
|
+
if (options.ignoreMissingTags === true) {
|
|
679
|
+
args.push("-imt");
|
|
680
|
+
}
|
|
677
681
|
const flag = options.insertIfMissing === true ? "-i" : "-m";
|
|
678
682
|
const modifications = options.modifications ?? [];
|
|
679
683
|
for (const mod of modifications) {
|
|
@@ -693,7 +697,7 @@ function buildArgs3(inputPath, options) {
|
|
|
693
697
|
async function dcmodify(inputPath, options) {
|
|
694
698
|
const validation = DcmodifyOptionsSchema.safeParse(options);
|
|
695
699
|
if (!validation.success) {
|
|
696
|
-
return err(
|
|
700
|
+
return err(createValidationError("dcmodify", validation.error));
|
|
697
701
|
}
|
|
698
702
|
const binaryResult = resolveBinary("dcmodify");
|
|
699
703
|
if (!binaryResult.ok) {
|
|
@@ -720,7 +724,7 @@ var DcmftestOptionsSchema = z.object({
|
|
|
720
724
|
async function dcmftest(inputPath, options) {
|
|
721
725
|
const validation = DcmftestOptionsSchema.safeParse(options);
|
|
722
726
|
if (!validation.success) {
|
|
723
|
-
return err(
|
|
727
|
+
return err(createValidationError("dcmftest", validation.error));
|
|
724
728
|
}
|
|
725
729
|
const binaryResult = resolveBinary("dcmftest");
|
|
726
730
|
if (!binaryResult.ok) {
|
|
@@ -775,7 +779,7 @@ function buildArgs4(options) {
|
|
|
775
779
|
async function dcmgpdir(options) {
|
|
776
780
|
const validation = DcmgpdirOptionsSchema.safeParse(options);
|
|
777
781
|
if (!validation.success) {
|
|
778
|
-
return err(
|
|
782
|
+
return err(createValidationError("dcmgpdir", validation.error));
|
|
779
783
|
}
|
|
780
784
|
const binaryResult = resolveBinary("dcmgpdir");
|
|
781
785
|
if (!binaryResult.ok) {
|
|
@@ -834,7 +838,7 @@ function buildArgs5(options) {
|
|
|
834
838
|
async function dcmmkdir(options) {
|
|
835
839
|
const validation = DcmmkdirOptionsSchema.safeParse(options);
|
|
836
840
|
if (!validation.success) {
|
|
837
|
-
return err(
|
|
841
|
+
return err(createValidationError("dcmmkdir", validation.error));
|
|
838
842
|
}
|
|
839
843
|
const binaryResult = resolveBinary("dcmmkdir");
|
|
840
844
|
if (!binaryResult.ok) {
|
|
@@ -882,7 +886,7 @@ function buildArgs6(options) {
|
|
|
882
886
|
async function dcmqridx(options) {
|
|
883
887
|
const validation = DcmqridxOptionsSchema.safeParse(options);
|
|
884
888
|
if (!validation.success) {
|
|
885
|
-
return err(
|
|
889
|
+
return err(createValidationError("dcmqridx", validation.error));
|
|
886
890
|
}
|
|
887
891
|
const binaryResult = resolveBinary("dcmqridx");
|
|
888
892
|
if (!binaryResult.ok) {
|
|
@@ -925,7 +929,7 @@ function buildArgs7(inputPath, outputPath, options) {
|
|
|
925
929
|
async function xml2dcm(inputPath, outputPath, options) {
|
|
926
930
|
const validation = Xml2dcmOptionsSchema.safeParse(options);
|
|
927
931
|
if (!validation.success) {
|
|
928
|
-
return err(
|
|
932
|
+
return err(createValidationError("xml2dcm", validation.error));
|
|
929
933
|
}
|
|
930
934
|
const binaryResult = resolveBinary("xml2dcm");
|
|
931
935
|
if (!binaryResult.ok) {
|
|
@@ -952,7 +956,7 @@ var Json2dcmOptionsSchema = z.object({
|
|
|
952
956
|
async function json2dcm(inputPath, outputPath, options) {
|
|
953
957
|
const validation = Json2dcmOptionsSchema.safeParse(options);
|
|
954
958
|
if (!validation.success) {
|
|
955
|
-
return err(
|
|
959
|
+
return err(createValidationError("json2dcm", validation.error));
|
|
956
960
|
}
|
|
957
961
|
const binaryResult = resolveBinary("json2dcm");
|
|
958
962
|
if (!binaryResult.ok) {
|
|
@@ -992,7 +996,7 @@ function buildArgs8(inputPath, outputPath, options) {
|
|
|
992
996
|
async function dump2dcm(inputPath, outputPath, options) {
|
|
993
997
|
const validation = Dump2dcmOptionsSchema.safeParse(options);
|
|
994
998
|
if (!validation.success) {
|
|
995
|
-
return err(
|
|
999
|
+
return err(createValidationError("dump2dcm", validation.error));
|
|
996
1000
|
}
|
|
997
1001
|
const binaryResult = resolveBinary("dump2dcm");
|
|
998
1002
|
if (!binaryResult.ok) {
|
|
@@ -1042,7 +1046,7 @@ function buildArgs9(inputPath, outputPath, options) {
|
|
|
1042
1046
|
async function img2dcm(inputPath, outputPath, options) {
|
|
1043
1047
|
const validation = Img2dcmOptionsSchema.safeParse(options);
|
|
1044
1048
|
if (!validation.success) {
|
|
1045
|
-
return err(
|
|
1049
|
+
return err(createValidationError("img2dcm", validation.error));
|
|
1046
1050
|
}
|
|
1047
1051
|
const binaryResult = resolveBinary("img2dcm");
|
|
1048
1052
|
if (!binaryResult.ok) {
|
|
@@ -1069,7 +1073,7 @@ var Pdf2dcmOptionsSchema = z.object({
|
|
|
1069
1073
|
async function pdf2dcm(inputPath, outputPath, options) {
|
|
1070
1074
|
const validation = Pdf2dcmOptionsSchema.safeParse(options);
|
|
1071
1075
|
if (!validation.success) {
|
|
1072
|
-
return err(
|
|
1076
|
+
return err(createValidationError("pdf2dcm", validation.error));
|
|
1073
1077
|
}
|
|
1074
1078
|
const binaryResult = resolveBinary("pdf2dcm");
|
|
1075
1079
|
if (!binaryResult.ok) {
|
|
@@ -1096,7 +1100,7 @@ var Dcm2pdfOptionsSchema = z.object({
|
|
|
1096
1100
|
async function dcm2pdf(inputPath, outputPath, options) {
|
|
1097
1101
|
const validation = Dcm2pdfOptionsSchema.safeParse(options);
|
|
1098
1102
|
if (!validation.success) {
|
|
1099
|
-
return err(
|
|
1103
|
+
return err(createValidationError("dcm2pdf", validation.error));
|
|
1100
1104
|
}
|
|
1101
1105
|
const binaryResult = resolveBinary("dcm2pdf");
|
|
1102
1106
|
if (!binaryResult.ok) {
|
|
@@ -1123,7 +1127,7 @@ var Cda2dcmOptionsSchema = z.object({
|
|
|
1123
1127
|
async function cda2dcm(inputPath, outputPath, options) {
|
|
1124
1128
|
const validation = Cda2dcmOptionsSchema.safeParse(options);
|
|
1125
1129
|
if (!validation.success) {
|
|
1126
|
-
return err(
|
|
1130
|
+
return err(createValidationError("cda2dcm", validation.error));
|
|
1127
1131
|
}
|
|
1128
1132
|
const binaryResult = resolveBinary("cda2dcm");
|
|
1129
1133
|
if (!binaryResult.ok) {
|
|
@@ -1150,7 +1154,7 @@ var Dcm2cdaOptionsSchema = z.object({
|
|
|
1150
1154
|
async function dcm2cda(inputPath, outputPath, options) {
|
|
1151
1155
|
const validation = Dcm2cdaOptionsSchema.safeParse(options);
|
|
1152
1156
|
if (!validation.success) {
|
|
1153
|
-
return err(
|
|
1157
|
+
return err(createValidationError("dcm2cda", validation.error));
|
|
1154
1158
|
}
|
|
1155
1159
|
const binaryResult = resolveBinary("dcm2cda");
|
|
1156
1160
|
if (!binaryResult.ok) {
|
|
@@ -1177,7 +1181,7 @@ var Stl2dcmOptionsSchema = z.object({
|
|
|
1177
1181
|
async function stl2dcm(inputPath, outputPath, options) {
|
|
1178
1182
|
const validation = Stl2dcmOptionsSchema.safeParse(options);
|
|
1179
1183
|
if (!validation.success) {
|
|
1180
|
-
return err(
|
|
1184
|
+
return err(createValidationError("stl2dcm", validation.error));
|
|
1181
1185
|
}
|
|
1182
1186
|
const binaryResult = resolveBinary("stl2dcm");
|
|
1183
1187
|
if (!binaryResult.ok) {
|
|
@@ -1213,7 +1217,7 @@ function buildArgs10(inputPath, outputPath, options) {
|
|
|
1213
1217
|
async function dcmcrle(inputPath, outputPath, options) {
|
|
1214
1218
|
const validation = DcmcrleOptionsSchema.safeParse(options);
|
|
1215
1219
|
if (!validation.success) {
|
|
1216
|
-
return err(
|
|
1220
|
+
return err(createValidationError("dcmcrle", validation.error));
|
|
1217
1221
|
}
|
|
1218
1222
|
const binaryResult = resolveBinary("dcmcrle");
|
|
1219
1223
|
if (!binaryResult.ok) {
|
|
@@ -1249,7 +1253,7 @@ function buildArgs11(inputPath, outputPath, options) {
|
|
|
1249
1253
|
async function dcmdrle(inputPath, outputPath, options) {
|
|
1250
1254
|
const validation = DcmdrleOptionsSchema.safeParse(options);
|
|
1251
1255
|
if (!validation.success) {
|
|
1252
|
-
return err(
|
|
1256
|
+
return err(createValidationError("dcmdrle", validation.error));
|
|
1253
1257
|
}
|
|
1254
1258
|
const binaryResult = resolveBinary("dcmdrle");
|
|
1255
1259
|
if (!binaryResult.ok) {
|
|
@@ -1285,7 +1289,7 @@ function buildArgs12(inputPath, outputPath, options) {
|
|
|
1285
1289
|
async function dcmencap(inputPath, outputPath, options) {
|
|
1286
1290
|
const validation = DcmencapOptionsSchema.safeParse(options);
|
|
1287
1291
|
if (!validation.success) {
|
|
1288
|
-
return err(
|
|
1292
|
+
return err(createValidationError("dcmencap", validation.error));
|
|
1289
1293
|
}
|
|
1290
1294
|
const binaryResult = resolveBinary("dcmencap");
|
|
1291
1295
|
if (!binaryResult.ok) {
|
|
@@ -1312,7 +1316,7 @@ var DcmdecapOptionsSchema = z.object({
|
|
|
1312
1316
|
async function dcmdecap(inputPath, outputPath, options) {
|
|
1313
1317
|
const validation = DcmdecapOptionsSchema.safeParse(options);
|
|
1314
1318
|
if (!validation.success) {
|
|
1315
|
-
return err(
|
|
1319
|
+
return err(createValidationError("dcmdecap", validation.error));
|
|
1316
1320
|
}
|
|
1317
1321
|
const binaryResult = resolveBinary("dcmdecap");
|
|
1318
1322
|
if (!binaryResult.ok) {
|
|
@@ -1352,7 +1356,7 @@ function buildArgs13(inputPath, outputPath, options) {
|
|
|
1352
1356
|
async function dcmcjpeg(inputPath, outputPath, options) {
|
|
1353
1357
|
const validation = DcmcjpegOptionsSchema.safeParse(options);
|
|
1354
1358
|
if (!validation.success) {
|
|
1355
|
-
return err(
|
|
1359
|
+
return err(createValidationError("dcmcjpeg", validation.error));
|
|
1356
1360
|
}
|
|
1357
1361
|
const binaryResult = resolveBinary("dcmcjpeg");
|
|
1358
1362
|
if (!binaryResult.ok) {
|
|
@@ -1401,7 +1405,7 @@ function buildArgs14(inputPath, outputPath, options) {
|
|
|
1401
1405
|
async function dcmdjpeg(inputPath, outputPath, options) {
|
|
1402
1406
|
const validation = DcmdjpegOptionsSchema.safeParse(options);
|
|
1403
1407
|
if (!validation.success) {
|
|
1404
|
-
return err(
|
|
1408
|
+
return err(createValidationError("dcmdjpeg", validation.error));
|
|
1405
1409
|
}
|
|
1406
1410
|
const binaryResult = resolveBinary("dcmdjpeg");
|
|
1407
1411
|
if (!binaryResult.ok) {
|
|
@@ -1443,7 +1447,7 @@ function buildArgs15(inputPath, outputPath, options) {
|
|
|
1443
1447
|
async function dcmcjpls(inputPath, outputPath, options) {
|
|
1444
1448
|
const validation = DcmcjplsOptionsSchema.safeParse(options);
|
|
1445
1449
|
if (!validation.success) {
|
|
1446
|
-
return err(
|
|
1450
|
+
return err(createValidationError("dcmcjpls", validation.error));
|
|
1447
1451
|
}
|
|
1448
1452
|
const binaryResult = resolveBinary("dcmcjpls");
|
|
1449
1453
|
if (!binaryResult.ok) {
|
|
@@ -1492,7 +1496,7 @@ function buildArgs16(inputPath, outputPath, options) {
|
|
|
1492
1496
|
async function dcmdjpls(inputPath, outputPath, options) {
|
|
1493
1497
|
const validation = DcmdjplsOptionsSchema.safeParse(options);
|
|
1494
1498
|
if (!validation.success) {
|
|
1495
|
-
return err(
|
|
1499
|
+
return err(createValidationError("dcmdjpls", validation.error));
|
|
1496
1500
|
}
|
|
1497
1501
|
const binaryResult = resolveBinary("dcmdjpls");
|
|
1498
1502
|
if (!binaryResult.ok) {
|
|
@@ -1551,7 +1555,7 @@ function buildArgs17(inputPath, outputPath, options) {
|
|
|
1551
1555
|
async function dcmj2pnm(inputPath, outputPath, options) {
|
|
1552
1556
|
const validation = Dcmj2pnmOptionsSchema.safeParse(options);
|
|
1553
1557
|
if (!validation.success) {
|
|
1554
|
-
return err(
|
|
1558
|
+
return err(createValidationError("dcmj2pnm", validation.error));
|
|
1555
1559
|
}
|
|
1556
1560
|
const binaryResult = resolveBinary("dcmj2pnm");
|
|
1557
1561
|
if (!binaryResult.ok) {
|
|
@@ -1607,7 +1611,7 @@ function buildArgs18(inputPath, outputPath, options) {
|
|
|
1607
1611
|
async function dcm2pnm(inputPath, outputPath, options) {
|
|
1608
1612
|
const validation = Dcm2pnmOptionsSchema.safeParse(options);
|
|
1609
1613
|
if (!validation.success) {
|
|
1610
|
-
return err(
|
|
1614
|
+
return err(createValidationError("dcm2pnm", validation.error));
|
|
1611
1615
|
}
|
|
1612
1616
|
const binaryResult = resolveBinary("dcm2pnm");
|
|
1613
1617
|
if (!binaryResult.ok) {
|
|
@@ -1655,7 +1659,7 @@ function buildArgs19(inputPath, outputPath, options) {
|
|
|
1655
1659
|
async function dcmscale(inputPath, outputPath, options) {
|
|
1656
1660
|
const validation = DcmscaleOptionsSchema.safeParse(options);
|
|
1657
1661
|
if (!validation.success) {
|
|
1658
|
-
return err(
|
|
1662
|
+
return err(createValidationError("dcmscale", validation.error));
|
|
1659
1663
|
}
|
|
1660
1664
|
const binaryResult = resolveBinary("dcmscale");
|
|
1661
1665
|
if (!binaryResult.ok) {
|
|
@@ -1695,7 +1699,7 @@ function buildArgs20(inputPath, outputPath, options) {
|
|
|
1695
1699
|
async function dcmquant(inputPath, outputPath, options) {
|
|
1696
1700
|
const validation = DcmquantOptionsSchema.safeParse(options);
|
|
1697
1701
|
if (!validation.success) {
|
|
1698
|
-
return err(
|
|
1702
|
+
return err(createValidationError("dcmquant", validation.error));
|
|
1699
1703
|
}
|
|
1700
1704
|
const binaryResult = resolveBinary("dcmquant");
|
|
1701
1705
|
if (!binaryResult.ok) {
|
|
@@ -1742,7 +1746,7 @@ function buildArgs21(options) {
|
|
|
1742
1746
|
async function dcmdspfn(options) {
|
|
1743
1747
|
const validation = DcmdspfnOptionsSchema.safeParse(options);
|
|
1744
1748
|
if (!validation.success) {
|
|
1745
|
-
return err(
|
|
1749
|
+
return err(createValidationError("dcmdspfn", validation.error));
|
|
1746
1750
|
}
|
|
1747
1751
|
const binaryResult = resolveBinary("dcmdspfn");
|
|
1748
1752
|
if (!binaryResult.ok) {
|
|
@@ -1769,7 +1773,7 @@ var Dcod2lumOptionsSchema = z.object({
|
|
|
1769
1773
|
async function dcod2lum(inputPath, outputPath, options) {
|
|
1770
1774
|
const validation = Dcod2lumOptionsSchema.safeParse(options);
|
|
1771
1775
|
if (!validation.success) {
|
|
1772
|
-
return err(
|
|
1776
|
+
return err(createValidationError("dcod2lum", validation.error));
|
|
1773
1777
|
}
|
|
1774
1778
|
const binaryResult = resolveBinary("dcod2lum");
|
|
1775
1779
|
if (!binaryResult.ok) {
|
|
@@ -1805,7 +1809,7 @@ function buildArgs22(inputPath, outputPath, options) {
|
|
|
1805
1809
|
async function dconvlum(inputPath, outputPath, options) {
|
|
1806
1810
|
const validation = DconvlumOptionsSchema.safeParse(options);
|
|
1807
1811
|
if (!validation.success) {
|
|
1808
|
-
return err(
|
|
1812
|
+
return err(createValidationError("dconvlum", validation.error));
|
|
1809
1813
|
}
|
|
1810
1814
|
const binaryResult = resolveBinary("dconvlum");
|
|
1811
1815
|
if (!binaryResult.ok) {
|
|
@@ -1895,7 +1899,7 @@ function buildArgs24(options) {
|
|
|
1895
1899
|
async function dcmsend(options) {
|
|
1896
1900
|
const validation = DcmsendOptionsSchema.safeParse(options);
|
|
1897
1901
|
if (!validation.success) {
|
|
1898
|
-
return err(
|
|
1902
|
+
return err(createValidationError("dcmsend", validation.error));
|
|
1899
1903
|
}
|
|
1900
1904
|
const binaryResult = resolveBinary("dcmsend");
|
|
1901
1905
|
if (!binaryResult.ok) {
|
|
@@ -1915,6 +1919,32 @@ async function dcmsend(options) {
|
|
|
1915
1919
|
}
|
|
1916
1920
|
return ok({ success: true, stderr: result.value.stderr });
|
|
1917
1921
|
}
|
|
1922
|
+
var ProposedTransferSyntax = {
|
|
1923
|
+
UNCOMPRESSED: "uncompressed",
|
|
1924
|
+
LITTLE_ENDIAN: "littleEndian",
|
|
1925
|
+
BIG_ENDIAN: "bigEndian",
|
|
1926
|
+
IMPLICIT_VR: "implicitVR",
|
|
1927
|
+
JPEG_LOSSLESS: "jpegLossless",
|
|
1928
|
+
JPEG_8BIT: "jpeg8Bit",
|
|
1929
|
+
JPEG_12BIT: "jpeg12Bit",
|
|
1930
|
+
J2K_LOSSLESS: "j2kLossless",
|
|
1931
|
+
J2K_LOSSY: "j2kLossy",
|
|
1932
|
+
JLS_LOSSLESS: "jlsLossless",
|
|
1933
|
+
JLS_LOSSY: "jlsLossy"
|
|
1934
|
+
};
|
|
1935
|
+
var PROPOSED_TS_FLAG_MAP = {
|
|
1936
|
+
[ProposedTransferSyntax.UNCOMPRESSED]: "-x=",
|
|
1937
|
+
[ProposedTransferSyntax.LITTLE_ENDIAN]: "-xe",
|
|
1938
|
+
[ProposedTransferSyntax.BIG_ENDIAN]: "-xb",
|
|
1939
|
+
[ProposedTransferSyntax.IMPLICIT_VR]: "-xi",
|
|
1940
|
+
[ProposedTransferSyntax.JPEG_LOSSLESS]: "-xs",
|
|
1941
|
+
[ProposedTransferSyntax.JPEG_8BIT]: "-xy",
|
|
1942
|
+
[ProposedTransferSyntax.JPEG_12BIT]: "-xx",
|
|
1943
|
+
[ProposedTransferSyntax.J2K_LOSSLESS]: "-xv",
|
|
1944
|
+
[ProposedTransferSyntax.J2K_LOSSY]: "-xw",
|
|
1945
|
+
[ProposedTransferSyntax.JLS_LOSSLESS]: "-xt",
|
|
1946
|
+
[ProposedTransferSyntax.JLS_LOSSY]: "-xu"
|
|
1947
|
+
};
|
|
1918
1948
|
var StorescuOptionsSchema = z.object({
|
|
1919
1949
|
timeoutMs: z.number().int().positive().optional(),
|
|
1920
1950
|
signal: z.instanceof(AbortSignal).optional(),
|
|
@@ -1924,7 +1954,20 @@ var StorescuOptionsSchema = z.object({
|
|
|
1924
1954
|
callingAETitle: z.string().min(1).max(16).refine(isValidAETitle, { message: "AE Title contains invalid characters" }).optional(),
|
|
1925
1955
|
calledAETitle: z.string().min(1).max(16).refine(isValidAETitle, { message: "AE Title contains invalid characters" }).optional(),
|
|
1926
1956
|
scanDirectories: z.boolean().optional(),
|
|
1927
|
-
recurse: z.boolean().optional()
|
|
1957
|
+
recurse: z.boolean().optional(),
|
|
1958
|
+
proposedTransferSyntax: z.enum([
|
|
1959
|
+
"uncompressed",
|
|
1960
|
+
"littleEndian",
|
|
1961
|
+
"bigEndian",
|
|
1962
|
+
"implicitVR",
|
|
1963
|
+
"jpegLossless",
|
|
1964
|
+
"jpeg8Bit",
|
|
1965
|
+
"jpeg12Bit",
|
|
1966
|
+
"j2kLossless",
|
|
1967
|
+
"j2kLossy",
|
|
1968
|
+
"jlsLossless",
|
|
1969
|
+
"jlsLossy"
|
|
1970
|
+
]).optional()
|
|
1928
1971
|
}).strict();
|
|
1929
1972
|
function buildArgs25(options) {
|
|
1930
1973
|
const args = [];
|
|
@@ -1940,6 +1983,9 @@ function buildArgs25(options) {
|
|
|
1940
1983
|
if (options.recurse === true) {
|
|
1941
1984
|
args.push("+r");
|
|
1942
1985
|
}
|
|
1986
|
+
if (options.proposedTransferSyntax !== void 0) {
|
|
1987
|
+
args.push(PROPOSED_TS_FLAG_MAP[options.proposedTransferSyntax]);
|
|
1988
|
+
}
|
|
1943
1989
|
args.push(options.host, String(options.port));
|
|
1944
1990
|
args.push(...options.files);
|
|
1945
1991
|
return args;
|
|
@@ -1947,7 +1993,7 @@ function buildArgs25(options) {
|
|
|
1947
1993
|
async function storescu(options) {
|
|
1948
1994
|
const validation = StorescuOptionsSchema.safeParse(options);
|
|
1949
1995
|
if (!validation.success) {
|
|
1950
|
-
return err(
|
|
1996
|
+
return err(createValidationError("storescu", validation.error));
|
|
1951
1997
|
}
|
|
1952
1998
|
const binaryResult = resolveBinary("storescu");
|
|
1953
1999
|
if (!binaryResult.ok) {
|
|
@@ -2087,7 +2133,7 @@ function buildArgs27(options) {
|
|
|
2087
2133
|
async function movescu(options) {
|
|
2088
2134
|
const validation = MovescuOptionsSchema.safeParse(options);
|
|
2089
2135
|
if (!validation.success) {
|
|
2090
|
-
return err(
|
|
2136
|
+
return err(createValidationError("movescu", validation.error));
|
|
2091
2137
|
}
|
|
2092
2138
|
const binaryResult = resolveBinary("movescu");
|
|
2093
2139
|
if (!binaryResult.ok) {
|
|
@@ -2151,7 +2197,7 @@ function buildArgs28(options) {
|
|
|
2151
2197
|
async function getscu(options) {
|
|
2152
2198
|
const validation = GetscuOptionsSchema.safeParse(options);
|
|
2153
2199
|
if (!validation.success) {
|
|
2154
|
-
return err(
|
|
2200
|
+
return err(createValidationError("getscu", validation.error));
|
|
2155
2201
|
}
|
|
2156
2202
|
const binaryResult = resolveBinary("getscu");
|
|
2157
2203
|
if (!binaryResult.ok) {
|
|
@@ -2193,7 +2239,7 @@ function buildArgs29(options) {
|
|
|
2193
2239
|
async function termscu(options) {
|
|
2194
2240
|
const validation = TermscuOptionsSchema.safeParse(options);
|
|
2195
2241
|
if (!validation.success) {
|
|
2196
|
-
return err(
|
|
2242
|
+
return err(createValidationError("termscu", validation.error));
|
|
2197
2243
|
}
|
|
2198
2244
|
const binaryResult = resolveBinary("termscu");
|
|
2199
2245
|
if (!binaryResult.ok) {
|
|
@@ -2237,7 +2283,7 @@ function buildArgs30(inputPath, options) {
|
|
|
2237
2283
|
async function dsrdump(inputPath, options) {
|
|
2238
2284
|
const validation = DsrdumpOptionsSchema.safeParse(options);
|
|
2239
2285
|
if (!validation.success) {
|
|
2240
|
-
return err(
|
|
2286
|
+
return err(createValidationError("dsrdump", validation.error));
|
|
2241
2287
|
}
|
|
2242
2288
|
const binaryResult = resolveBinary("dsrdump");
|
|
2243
2289
|
if (!binaryResult.ok) {
|
|
@@ -2277,7 +2323,7 @@ function buildArgs31(inputPath, options) {
|
|
|
2277
2323
|
async function dsr2xml(inputPath, options) {
|
|
2278
2324
|
const validation = Dsr2xmlOptionsSchema.safeParse(options);
|
|
2279
2325
|
if (!validation.success) {
|
|
2280
|
-
return err(
|
|
2326
|
+
return err(createValidationError("dsr2xml", validation.error));
|
|
2281
2327
|
}
|
|
2282
2328
|
const binaryResult = resolveBinary("dsr2xml");
|
|
2283
2329
|
if (!binaryResult.ok) {
|
|
@@ -2317,7 +2363,7 @@ function buildArgs32(inputPath, outputPath, options) {
|
|
|
2317
2363
|
async function xml2dsr(inputPath, outputPath, options) {
|
|
2318
2364
|
const validation = Xml2dsrOptionsSchema.safeParse(options);
|
|
2319
2365
|
if (!validation.success) {
|
|
2320
|
-
return err(
|
|
2366
|
+
return err(createValidationError("xml2dsr", validation.error));
|
|
2321
2367
|
}
|
|
2322
2368
|
const binaryResult = resolveBinary("xml2dsr");
|
|
2323
2369
|
if (!binaryResult.ok) {
|
|
@@ -2353,7 +2399,7 @@ function buildArgs33(inputPath, options) {
|
|
|
2353
2399
|
async function drtdump(inputPath, options) {
|
|
2354
2400
|
const validation = DrtdumpOptionsSchema.safeParse(options);
|
|
2355
2401
|
if (!validation.success) {
|
|
2356
|
-
return err(
|
|
2402
|
+
return err(createValidationError("drtdump", validation.error));
|
|
2357
2403
|
}
|
|
2358
2404
|
const binaryResult = resolveBinary("drtdump");
|
|
2359
2405
|
if (!binaryResult.ok) {
|
|
@@ -2380,7 +2426,7 @@ var DcmpsmkOptionsSchema = z.object({
|
|
|
2380
2426
|
async function dcmpsmk(inputPath, outputPath, options) {
|
|
2381
2427
|
const validation = DcmpsmkOptionsSchema.safeParse(options);
|
|
2382
2428
|
if (!validation.success) {
|
|
2383
|
-
return err(
|
|
2429
|
+
return err(createValidationError("dcmpsmk", validation.error));
|
|
2384
2430
|
}
|
|
2385
2431
|
const binaryResult = resolveBinary("dcmpsmk");
|
|
2386
2432
|
if (!binaryResult.ok) {
|
|
@@ -2407,7 +2453,7 @@ var DcmpschkOptionsSchema = z.object({
|
|
|
2407
2453
|
async function dcmpschk(inputPath, options) {
|
|
2408
2454
|
const validation = DcmpschkOptionsSchema.safeParse(options);
|
|
2409
2455
|
if (!validation.success) {
|
|
2410
|
-
return err(
|
|
2456
|
+
return err(createValidationError("dcmpschk", validation.error));
|
|
2411
2457
|
}
|
|
2412
2458
|
const binaryResult = resolveBinary("dcmpschk");
|
|
2413
2459
|
if (!binaryResult.ok) {
|
|
@@ -2453,7 +2499,7 @@ function buildArgs34(options) {
|
|
|
2453
2499
|
async function dcmprscu(options) {
|
|
2454
2500
|
const validation = DcmprscuOptionsSchema.safeParse(options);
|
|
2455
2501
|
if (!validation.success) {
|
|
2456
|
-
return err(
|
|
2502
|
+
return err(createValidationError("dcmprscu", validation.error));
|
|
2457
2503
|
}
|
|
2458
2504
|
const binaryResult = resolveBinary("dcmprscu");
|
|
2459
2505
|
if (!binaryResult.ok) {
|
|
@@ -2489,7 +2535,7 @@ function buildArgs35(inputPath, options) {
|
|
|
2489
2535
|
async function dcmpsprt(inputPath, options) {
|
|
2490
2536
|
const validation = DcmpsprtOptionsSchema.safeParse(options);
|
|
2491
2537
|
if (!validation.success) {
|
|
2492
|
-
return err(
|
|
2538
|
+
return err(createValidationError("dcmpsprt", validation.error));
|
|
2493
2539
|
}
|
|
2494
2540
|
const binaryResult = resolveBinary("dcmpsprt");
|
|
2495
2541
|
if (!binaryResult.ok) {
|
|
@@ -2529,7 +2575,7 @@ function buildArgs36(inputPath, outputPath, options) {
|
|
|
2529
2575
|
async function dcmp2pgm(inputPath, outputPath, options) {
|
|
2530
2576
|
const validation = Dcmp2pgmOptionsSchema.safeParse(options);
|
|
2531
2577
|
if (!validation.success) {
|
|
2532
|
-
return err(
|
|
2578
|
+
return err(createValidationError("dcmp2pgm", validation.error));
|
|
2533
2579
|
}
|
|
2534
2580
|
const binaryResult = resolveBinary("dcmp2pgm");
|
|
2535
2581
|
if (!binaryResult.ok) {
|
|
@@ -2556,7 +2602,7 @@ var DcmmkcrvOptionsSchema = z.object({
|
|
|
2556
2602
|
async function dcmmkcrv(inputPath, outputPath, options) {
|
|
2557
2603
|
const validation = DcmmkcrvOptionsSchema.safeParse(options);
|
|
2558
2604
|
if (!validation.success) {
|
|
2559
|
-
return err(
|
|
2605
|
+
return err(createValidationError("dcmmkcrv", validation.error));
|
|
2560
2606
|
}
|
|
2561
2607
|
const binaryResult = resolveBinary("dcmmkcrv");
|
|
2562
2608
|
if (!binaryResult.ok) {
|
|
@@ -2617,7 +2663,7 @@ function buildArgs37(outputPath, options) {
|
|
|
2617
2663
|
async function dcmmklut(outputPath, options) {
|
|
2618
2664
|
const validation = DcmmklutOptionsSchema.safeParse(options);
|
|
2619
2665
|
if (!validation.success) {
|
|
2620
|
-
return err(
|
|
2666
|
+
return err(createValidationError("dcmmklut", validation.error));
|
|
2621
2667
|
}
|
|
2622
2668
|
const binaryResult = resolveBinary("dcmmklut");
|
|
2623
2669
|
if (!binaryResult.ok) {
|
|
@@ -2638,6 +2684,6 @@ async function dcmmklut(outputPath, options) {
|
|
|
2638
2684
|
return ok({ outputPath });
|
|
2639
2685
|
}
|
|
2640
2686
|
|
|
2641
|
-
export { ColorConversion, Dcm2pnmOutputFormat, Dcm2xmlCharset, DcmdumpFormat, Dcmj2pnmOutputFormat, GetQueryModel, Img2dcmInputFormat, JplsColorConversion, LutType, MoveQueryModel, QueryModel, TransferSyntax, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmodify, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr };
|
|
2687
|
+
export { ColorConversion, Dcm2pnmOutputFormat, Dcm2xmlCharset, DcmdumpFormat, Dcmj2pnmOutputFormat, GetQueryModel, Img2dcmInputFormat, JplsColorConversion, LutType, MoveQueryModel, ProposedTransferSyntax, QueryModel, TransferSyntax, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmodify, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr };
|
|
2642
2688
|
//# sourceMappingURL=tools.js.map
|
|
2643
2689
|
//# sourceMappingURL=tools.js.map
|