Feeding DICOM from Orthanc for A.I. calculation is slow

Try to develop a web based A.I. CT segmentation application.

A.I. application and Orthanc in the same machine. The loading and parsing of 200 instances take under 10 seconds. But loading and parsing 1300 instances can take over 5 minutes. Please Advice.

The Dicom fetch from Orthanc in renamed with new random serial number that I can’t sort in sequence which will create error in A.I. segmentation. Please advice how I can fetch instances in sequence.

The Machine OS is Windows 10 with dual Xeon Gold processors, 126GB Ram, Nvidia 3080 GPU and 4TB SSD Drive.

Following is a dumb from the A.I. application. Thank you in advance.

{ “ExpectedNumberOfInstances” : null, “ID” : “263d1136-420b27b4-a78bae0e-852482bd-2217b2bd”, “Instances” : [ “d840ffa2-c50b7dc5-46ef12e3-2ffa3ef6-74ca2cf1”, “f339bd97-9711a060-8967eeab-f3fe3298-df9fa33d”, “8dacdcbe-3da314b6-a5934f22-19671c61-9ec4b03e”, “f01459e7-a4ea60d7-e72c322d-750e025f-24573dd8”, “ee8557b2-554b3ab7-5cedd8d1-aa4d0732-6f1e2d0d”, “f5e6840c-faf4d284-746673d3-2de1e548-a83bd621”, “49f6af14-4938d1bd-ca5e8a0e-e3825ec9-bf970ea1”, “708f1490-6617dd1f-b579967d-3747155e-4995cc40”, “ac184906-c8346667-a2a3cfd7-1359bd72-ee8eb88d”, “dffc5432-93f148c1-2bc67b77-38a3d625-7c6ae547”, “e0ebe692-cfb65806-a095e112-511f2414-16785e5b”, “2a4ee297-32f2739e-644c420f-23e3222d-e366a8cd”, “3ef6a66a-f5467d49-7054bd17-6777150f-ba503cb1”, “d129c9df-48948673-a2b0d967-9771b69c-2ca9466b”, “7c6c5fea-0cd26611-ceea066f-03368643-152ae643”, “04f9ea15-cab0a889-afbbabcb-0b8b386e-7da439eb”, “3eef3cd1-4d5d711f-225125e0-57103a2a-62f96a4f”, “c36bf2a1-fb2be061-9c8bf0e8-ae7f02f5-2deba577”, “987eb9e8-e1353625-8a42309b-44ad6fa1-6018cc7e”, “969a6059-5b5f06f8-ccafeaea-512ead0e-a60ea6c0”, “9c0713ff-b667122c-6e476584-ee75aa95-2d0b21db”, “80561c17-8315bbc2-cbc0f384-609221cb-fc1f9ca5”, “fce8fecd-ab10feb1-6a1f392d-04898f46-9b40c175”, “bc38f06f-98115741-947fbb90-04b69c41-28d94c3f”, “41525c78-207c8ad8-68407648-662e878a-e0943044”, “4979876e-6cd15a7f-89dba1e0-0443776c-481f8d72”, “1f11f336-4f82374f-f07e74df-fd084aaf-0c3bbfdf”, “43f6aecc-b69b48f1-d9772b27-71ab6c54-6aef015a”, “a89d828f-6ab1a21e-9793557b-3a58b8a0-107b1a0f”, “f5bba7e2-b7dd79c7-a0ddaae7-254da3a9-be6b29e4”, “48010819-53e36dc1-369e7d97-01240ce5-f6452219”, “6aa7a615-4065f635-9e55c6c4-70aac47b-15c574db”, “d4851abd-4229c2a0-1be7ce37-5dc4c5bb-efe372ae”, “f48bb651-92f9aadd-6ae0bc77-84fda1e0-ee9cf668”, “472aa88a-faf75e29-50591af5-1f30183d-5ca88bb0”, “d6f99a63-678e2543-0b69400c-4b19bbf8-ce4f239a”, “fe65681d-438a9dff-582cd20a-fb906537-06ae4a30”, “6b9d575a-bd359626-33894645-635ebf40-41a1d175”, “0d580f10-5bf884dd-c4f7e08a-43f72747-5df9b9f6”, “aa7f9d50-23f79e2b-52bc1581-c1fedbf9-f052bb19”, “6ce0eb88-b735c481-0458cd33-d5a89567-4d0e230e”, “066d3787-9cbb1b59-398d5bf0-f41d0c96-a487e955”, “0e7c16a9-5578a3a1-4041f757-9b6ea5db-5df8abf7”, “7ddae65f-4904569b-efb6b8ad-73da990b-f13e1d28”, “e6102708-3c670c8c-bf20855b-83b6a338-8f51c1d1”, “fd39be49-7f9dc818-b78340cd-e44e7c62-a66f6856”, “3ec212d5-cf6d7d15-722aa15d-e93e7b45-f9224979”, “32b21b3f-307cfb9b-db355ead-311116da-a379aa51”, “f10d095f-79464178-c028eb72-e40edaa7-b4ad4aa8”, “c4e11b30-12e5231f-657a0acb-0c816270-9036f23a”, “9330bf4b-cf34eedb-00a1174c-1a5daeb8-8e057834”, “45179741-8103aeb2-9591c734-a7216226-6afeef5e”, “271efb40-14f5be1a-3e65fa13-6ba80382-03c40b82”, “be0bf675-0cc5574a-8471e714-8e0be2d1-2304000f”, “0b8f2d35-9191c8b1-0b8b2f0a-0aa151dd-acefdf3e”, “cd8a0a7e-34f1f138-193d6033-ce28b196-21a3e537”, “17581071-f3fc32f6-e7a45d31-9331d43e-6b9c4584”, “a13698f2-218ace85-dbd06aa7-29752d97-dc5a89a6”, “3cf18779-b0aabac1-6f24219a-b2f0ad74-530cb953”, “d106255a-ac07901a-d1669024-990bda6e-f413f38f”, “4c0bec02-c72986dc-97ca899d-d5d95697-a45ff87f”, “0ddfabf6-49b863c3-3ab9fdba-03bb7215-ae45ba22”, “4bb03e6d-11384fef-9ef88596-0e09caac-1280e731”, “236a0a5b-a2cd2de8-9d166e18-3f6bac14-b8d52c61”, “df984c24-85006f3d-18c2eaae-2e715a26-e68c6620”, “c86e1d45-2c2fb576-1aa3c776-a39f7208-98a77ba3”, “cf6ed294-e3fd40fa-21b054de-64f6a119-a9516b44”, “054491f8-c5c89fe1-eddd6eac-e35d4f6b-a2cfa626”, “b32cb477-0806ac52-29f4d6b0-4fb1a34b-179c7189”, “33178c5b-861df708-934a9bd3-33d9e523-b404496c”, “4fdde255-1f5eeb16-cb0354de-67e38196-f86dfd39”, “510532e8-3b728db0-3c79c501-3261749d-669842a8”, “64c117f0-0655cc45-8ddeb41f-2c2c6144-11633d0f”, “6dc258df-ec99926b-19937eaf-06d42a1f-0ae93f88”, “9f306a97-a759d8ee-95bcd290-840f2d75-efe451a8”, “094fbf21-964df778-e6fd38b4-70140337-15bb89e1”, “6782b428-6a99f63b-5b003863-271ea405-7d772d81”, “6802bd1f-01bc17ab-64d3ca98-9d271e7d-1dc4ee31”, “5d580334-c738ca0c-b490f951-900e5804-5e509e60”, “97933149-6d167ff4-a5d715aa-435474dc-09d3e13e”, “99f051ab-61b5b8c1-b72fa412-d1defce8-642d835e”, “f5722827-c86a6f43-c6876aef-41032b7e-37eda3c3”, “fcb51992-760e31cd-b7139ffe-2c00bda1-08ffe3d3”, “1a10476a-033026c8-85ae44b7-09a5c41e-ab3287f8”, “7d342579-719d5e02-22484e5a-7845e107-10583455”, “abb36713-07885470-c67a2693-68266eda-8496d6e7”, “ef029751-5cc71e8f-7c51846a-86338064-29cb9c32”, “e0481350-2c2b0741-e66ea239-8749e85b-cb3f492b”, “5b8fa60d-a0013ff6-8ef798bb-2cc3b840-26bfbfaf”, “1bff5dd1-298e7e37-3d7f5170-d64026f9-2d36ea29”, “8598b256-b4044dd0-88c33c28-e71e695d-df5794c7”, “b376d2d2-2be52426-31a9bc23-ed12b352-9602fe26”, “e4e7c3ed-82236a38-06d78e28-fe8ee2f9-e17bce67”, “41b20288-3cdade52-7674470b-ac44573d-277c7dc0”, “56184360-1a34a7dc-23bded71-b087fdd7-7376d47d”, “d0a6bab4-ecbdadb3-bc24bc93-74eb4454-4e6d4d04”, “8950b9e5-d14b0935-12305a34-0a2bad24-7655574f”, “98988d59-f4d63853-fb430294-0edc793f-9593f5d6”, “41eb124d-266da29e-d0a67108-74808759-c63dcfa7”, “c7e51591-7bb9f7d5-5a5613ee-6588a9c1-c35c7e5e”, “ef0cda06-c68b7e61-f6aceda0-0163fe68-a1ba8ced”, “a19ff6d7-0b36d01b-8415f726-f27d012c-3f74c524”, “782e34c9-7e197f2b-aa8d805e-45053b47-c6c36280”, “7e808859-3a14b566-9476acd8-557c0f87-ed23ec2d”, “73e0bc83-8d369f24-0ee9bda9-c6980d2a-4e6216ee”, “eb9e767d-eee29c84-876e9d8c-06e85c36-f9c35187”, “175452a4-8b1cfe34-530261c8-3f837a55-ece750ec”, “b694f574-9f29c7ff-7dfb1d92-6266870e-d9ac8eeb”, “f3a7b453-388aa025-60ce1f75-805889af-ddc1cbb7”, “c3d91cbd-033fbaa9-a94a87a9-a4639ed2-d4642b26”, “9a97128f-757f6ef2-58196bf5-06f97bbd-aaceba2d”, “e59feab2-4271d11a-5667bc49-66196d6a-01a15c50”, “f982ca00-92448fd7-4fdd593a-218d247b-dfca7f36”, “33d08853-d03e7566-9f4e2384-6d41a4b5-8051393c”, “d14697b9-1ed8392b-e52bd3e9-382efab7-c572918a”, “6d08d6a8-b5373db1-ce3e983d-817797e0-f40b190a”, “cdab5e03-f0fca1b5-128a7c8e-ff58443f-c741f200”, “fd260835-17cb2aa8-5bdbf3a5-76a45708-2c5f199d”, “f59c8382-6e6b65e3-9858d0fd-ec81e28c-7a2b341c”, “cf219ff1-1393e610-a9495f8f-a96e644a-3d2e8ad2”, “49eb71cf-26386787-223e4a4c-03f5215e-baeff8f2”, “a59df0e2-e7d139cb-07fdcc85-507d0610-39c8d014”, “7de5a78d-f1f5173c-6338902c-35debe9f-cdac5d20”, “d0927bf5-e79a4014-517bf7dc-a7c23a80-51fe5d6a”, “8c7316c3-972f2e4f-be5a04f3-0c149c0f-07721f15”, “553a8ee5-6ef75078-5fb47cb9-898eca9a-608a4908”, “291448a2-cff183ef-78838b41-1d6fba84-362cae2d”, “7c73f4a5-c86b3d22-a70be868-a8dd6fde-0d7a87d0”, “2266c726-959d07f8-8a01d35b-75e74de8-628b5430”, “d3fa1938-f70afff9-ac71fb9b-6095184f-f6df9649”, “2bd690f6-66d136ad-a1d785a7-218d8b17-7dc639dd”, “4f9a7b08-dcd4b71c-7014a634-78e6cd47-52c9a335”, “dc159b2d-69cdc970-ceaac126-634a8648-a2b6ba92”, “1f9d593f-c34bbbcc-bd6a710d-c72afa66-8ce6a66a”, “47de6032-3928c69b-b7868228-ff7c516c-72b6f111”, “a855e5a6-23ef5b70-3dd430af-2d0fa787-ed1ded5b”, “73ed173e-fbc47133-9ddd764c-a5e2a89f-d1283dfc”, “2f99444c-35da3cac-d26524e2-3219cc5f-cde5cbe5”, “7402f294-cecd5cb6-82bc806d-498f1e6c-ccba6dae”, “5b5b4e8a-a50fc285-7579796c-e4c7e3ea-955770fa”, “7fa8053b-9e1c0574-01d0ae41-743a5586-28f3a5b0”, “c12b1dd1-9901f510-32fa8c0f-c28149fb-2d86e7e5”, “f3b1edc7-35c75baa-5efc7c6c-ae896a88-a603b11a”, “00db0bc8-8d200912-40e1245f-bd94218a-ec69198a”, “d41c896a-22c57a33-f383c138-d84ae91e-c2877663”, “ab0be512-2778fefd-b2826497-9bbc02e8-527dde30”, “b97d8339-75f0105f-a481c73e-358547e6-341bd4c9”, “af6d59ac-0fa65bf8-136bcb8a-aa477b7d-676170ef”, “a56c51bf-c0c54dd2-d1d099b3-dfb7c220-164d2fc4”, “5adcbdce-26c0b0aa-24bdce2c-5df3bd8d-8bd3f709”, “11b26a9d-3267a831-8e55ff85-70bd8052-6f0d3bcb”, “43b4a79a-57e86abc-ee55450e-5852ab83-b0d35184”, “a7c88993-b0803544-25a2e546-e62b3eb0-c4ca4a7d”, “c953426b-2ab8b8f8-195b1573-53606f01-eb5dac63”, “c77794c2-bb0444db-027904bc-1de1c5df-156a2a2a”, “7bf01a6a-4bc4ab66-9be5e6e3-4abca45f-633ca8bd”, “272302aa-a4bb20f9-3afdc075-a9845d62-c1220414”, “adcf6235-d5cdce3c-43a0ae43-e8169ea1-054c7b77”, “0408231c-e70ac66d-6b87ecae-6bbe6ef7-f04281b1”, “8621ca37-0a568da5-667aaa2d-9f101fae-8fa2ad8d”, “29877336-581211bb-0a869bb7-5550aede-44e03862”, “23b134df-3294e354-6b9a2a47-57869e38-c1a713f8”, “4812a740-a4b86205-465aa41d-25b08b9f-6d5955c1”, “87eb0e4e-f2f946a6-61adadf6-ebe4380a-0b7e27b2”, “0d6ff16c-18b6126e-68c2636f-615c4aba-0b7edc72”, “db32b9fc-6b1d9c9c-32fb4f0b-04b5abdd-eafc4e25”, “a865ea30-52c6f161-4d05a58d-ec61f09c-eaea9da2”, “e642fd9b-374bd121-ab58f301-0d141fbc-cf241544”, “fd08858a-8b86c433-bcbd1c00-b2808c0c-307f03dc”, “770496dd-89294167-1fb97161-1d3532df-e2cbf8be”, “1bc4f947-b738bdc1-ad455df6-64bc1ee9-0cbc231d”, “e3f7f5fb-33a080d9-b0025886-3bfd2c39-069169f2”, “341845f1-7d53e189-e4ac3817-1e3cd304-e5cf8a72”, “9f935754-c2712245-f07fb4ea-5cf1da56-938e38f6”, “f4287e39-2e28df6d-bc7b0ab1-b69a24a0-682cd502”, “1b2739ea-9b29b48a-a38de36b-e64e4d4b-0b6d595f”, “80691263-4e63e4ed-9083c492-2d6e8643-5aac31a1”, “a16e2588-59b15dbc-960cbff9-a185ab32-6f9055a3”, “9e3fcd88-9063677d-fe577ff4-fc7db1a3-8e87c95c”, “23766700-3441878d-957ab170-9bbf03c9-b5311f1c”, “1960a945-fb30158e-29017322-51398e6e-b3ee01c2”, “dcdaed13-0684d764-b6b5725f-e171eebf-9f06d9f8”, “e0ceaa6b-e1b2788d-17a779c4-26dda661-20592b08”, “40893a40-53ab0a58-7c07b708-75fcc3b8-2e5f8e43”, “a5aec7c9-f88a19b5-5a329e9b-894f25bd-22011306”, “0de88c44-70a5f6d3-48d9fc19-11a03aa7-a6fc293e”, “eec1830c-506d4c92-44046c73-9c1f1a6f-a6c63748”, “6bedc5f9-580b8a39-b69b1230-e9b813e5-f7879837”, “fa574256-37f8cd73-7191da1c-26648cbf-f55fedcd”, “1e02bb8f-b0b9b8ab-c8d40b1d-ebc24dd0-9330c93f”, “8ee0893b-ece44c09-81a72fed-2d16508a-af595201”, “0a5f4209-5f717691-3cca4897-fad997ea-8b3e9886”, “0f617135-ec16aa93-1f7241d8-9c637776-26907240”, “0ba51478-f7b7317b-3724bbc7-23f870a6-118e8f4d”, “a4f028cd-add60411-c9199bd6-acf92fa3-0943916e”, “a0dfe92f-7065f8ca-2cc8e365-a0fe169c-5995f669”, “e25c9db3-b6fc9926-6caa7a60-0cd65fd9-17efdb2e”, “7d717eb9-f626a6ca-6cc44002-9e2119de-84ba74d6”, “54a3ee26-a1e5c120-8f4cd02d-fe47a5e3-9c75fa07”, “4e5bf94c-fb7fd033-a66f150e-04002606-43caf0df”, “a2df16d6-0375dcb4-d9ba9e2f-8c14b08c-ebe95149”, “a6f67f43-196507ed-e6aa0b12-05be33f2-e9d42f5c”, “39c3a887-fb79d8c6-44328c55-dacf1571-a56974a8”, “63af6717-78b14abf-02813404-c70d88cf-3f33303c”, “c3fa4bb8-4875049c-a1a3b3d7-df803674-7de85135”, “caea3531-b07386a2-fdde6a4d-42eb4f80-44613556”, “ab99f81a-7e585df8-d13f97a1-a6ddfa4b-40052859”, “bf573910-596f93c6-fd6496ac-42df2d2b-e8ecfc35”, “ad08b9f4-f710a63d-eb0ce836-ab9ecc54-377e1389”, “2a8dc91e-e723c327-a00f4e8d-787da5e5-bc3fc830”, “f8010fe4-866d36ff-e69f6ec0-bfd6381d-1bf23f04”, “22613828-74ef2147-8d81402a-fafa6d26-5cdeaba6”, “0b6a5a0c-dbbf8905-dfcd46a4-ed3f7c5a-9ccf64f6”, “d2f2f691-461c9b04-c4d0144e-8aaaf6c7-bc94f019”, “437606b5-d9b64dd3-dd6f1c38-7b13a80d-7d7c266b”, “e08dbd24-b027f398-8a68c220-0166a478-f8b2a885”, “ef673ec2-a29ce42d-acb53be3-3fbfe4d1-7d249da8”, “1f775c26-7c5a37ae-4352dc46-5bd6291e-9d4f33e7”, “cd12d763-c66cc060-b63eec8c-191aae1c-0cc6b780”, “c8f2973c-916f4c77-b1067cc0-213f5832-aa32e057”, “a51b829e-ced217b2-283251dd-db71f5f9-417eac8e”, “66ba6069-c9594ab0-8e0b0d28-39a7c678-b752f331”, “77061d28-364ca51a-b3297f13-83f935e8-352684a4”, “7c726773-d62832ed-702a4eda-6302a96b-9e7c29e0”, “f3eb7ca7-81b7551b-902e49b3-028db320-ab28f6ee” ], “IsStable” : true, “LastUpdate” : “20220322T045248”, “MainDicomTags” : { “ImageOrientationPatient” : “1.000000\0.000000\0.000000\0.000000\1.000000\0.000000”, “Manufacturer” : “GE MEDICAL SYSTEMS”, “Modality” : “CT”, “OperatorsName” : “CSW”, “PerformedProcedureStepDescription” : “Low. ext. plain”, “ProtocolName” : “9.2 Knee”, “SeriesDate” : “20131112”, “SeriesDescription” : “LT KNEE”, “SeriesInstanceUID” : “1.2.840.113619.2.55.3.127953165.788.1384217307.857”, “SeriesNumber” : “102”, “SeriesTime” : “172031”, “StationName” : “ge05_oc0” }, “ParentStudy” : “87aa7e1b-00488d62-0c5a872e-711aada2-48152393”, “Status” : “Unknown”, “Type” : “Series” }

Not sure precisely what you are looking for. If you need to sort the instances or the series in some fashion you might look into using a Python script to process a request so that the results that are returned are compatible with your AI App:

e.g. See:

https://book.orthanc-server.com/plugins/python.html?highlight=sort#implementing-basic-paging (that is an example that short sorting and paging).

Please provide a full minimal working example (including sample date and your calls to the REST API) for somebody else to reproduce your issue:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

Also, make sure to read the FAQ about scalability:
https://book.orthanc-server.com/faq/scalability.html

Furthermore, in DICOM, you don’t have in general the notion of “sequences” in instances. Consider calling “/tools/find” with the “Expand” option set to “true” to retrieve all DICOM tags and sort the instances by yourself, according to whatever criteria you want to use:
https://book.orthanc-server.com/users/rest.html#performing-finds-within-orthanc
https://api.orthanc-server.com/#tag/System/paths/~1tools~1find/post

Depending on your needs, the (deprecated) “/series/…/ordered-slices” route in the Orthanc REST API might be what you are looking for:

https://api.orthanc-server.com/#tag/Series/paths/~1series~1{id}~1ordered-slices/get

Finally, as you are visibly working for a company, consider hiring the professional services of a freelancer. If you make money from Orthanc, you should support the project to answer your questions:

https://book.orthanc-server.com/users/support.html#finding-professional-assistance
https://opencollective.com/orthanc

Thanks all for the replies. I will study it. Most important, yes Orthanc is an excellent project. We will find ways to contribute back when our project show some presentable result. Hiring the professional services of a freelancer is an option.

s.jo…@gmail.com在 2022年3月31日星期四下午2:24:11 [UTC+8]寫道: