From 19dcca89b3ff0dfae9399e98618b176ad5715f7f Mon Sep 17 00:00:00 2001 From: mattia-wsl Date: Fri, 9 Apr 2021 11:03:23 +0200 Subject: [PATCH 1/2] changes 9.4 --- Pipfile | 3 +- Pipfile.lock | 548 +++++++++++++++++++++++++++++++-------------------- run.py | 54 +++-- 3 files changed, 369 insertions(+), 236 deletions(-) diff --git a/Pipfile b/Pipfile index 2fbc235..201e49b 100644 --- a/Pipfile +++ b/Pipfile @@ -16,8 +16,7 @@ SimpleITK="*" tqdm="*" fill_voids="*" zipfile36="*" +vtk = "*" [requires] python_version = "3.8" - - diff --git a/Pipfile.lock b/Pipfile.lock index 27ae0c0..c88a3ac 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "1e9aa47a2b74fea92f38a9bebd5a3e2ccda0c06f3225409a6533773410e4b7a9" + "sha256": "1c39ea75a396b2fc28437ffe02d028ab5e795fa85d9c7f4c4544e99e49e4a759" }, "pipfile-spec": 6, "requires": { @@ -32,168 +32,241 @@ }, "fastremap": { "hashes": [ - "sha256:035bd3e244618aa9331ac83043c2d5ee430023b8a86ba8d16f80e7104cf524c8", - "sha256:1f7398bf5db1578568c55dde79425d8abf8c2cfee3aaf23af5070ee205a0fed9", - "sha256:2ed91854f54b0747e2527c362b8e77f68290e9cb69fc45bc9aaeeb7f5a57d4a9", - "sha256:37bbbf43531edad99ae90f910e8a5ae4ab4f097101851b8862aebe98937430ea", - "sha256:5bff94e951c1945954e7b73c6ceac50fca6bf39f0babf320b3d3e2fbeedea9d2", - "sha256:713442445414b44afdb0ad11f17a5fedcb60f001aff851d1805573211a94b3db", - "sha256:7a40520ff29c027fca00611ba22a21bb42dd5601e6ad9b2cb8e90b16db3fdf25", - "sha256:83137f0a1136122b7d76e87cff6f408e3097b55a3244eaad39359f2d8cc26d12", - "sha256:85bb84e15a1fb0047c7b3952d84dca1aa7f1e7e1f0634b339402ef780d96164b", - "sha256:87c4996c2ebc61daf7610509f99263bbc42b03abf083d0ecb113563ba0be4eeb", - "sha256:9091b82cf68977c6998bad5becaafe0567f43fdbf0874ce91e81b9d79841af78", - "sha256:a7bf838a74131538eb728e68692ad8e14db8d4cad888344f64d2260b0711b041", - "sha256:b2be01f4fd99e680b30e22134c67b3ce7e55b3da07697ce44e4c9297c55d40d8", - "sha256:c0a1a05700c5d9f840fe757160fd29bc3228ba4de2f92e0aa6519cb7f661fc9a", - "sha256:de6f8db8749af6700d870a97d901b6ce57e38e40167ac5cabe60b60e96c55b30", - "sha256:ff646a9ab5b920b8808b0db090612ca5c7b573d1032cd74c0925af5652435a4b", - "sha256:ff94bd18ab4085ee148012a1800a656e91d3c251c5eb49fc559873cf7400190d" + "sha256:0a22e8b160b7576b44c2947fea71b9b82465221145038ee4d6e1be4c848dc59f", + "sha256:195e5268b63d875bb607cbf5900e60666f78aabfe2b4136d805e6f15481069d1", + "sha256:1c97b6230978a2bbb08666006bae9eb5c82374ef23b71d0eaa0a904b8719c0cb", + "sha256:259864f5f38e04f404344a65464ceecb1ddd85893e8b3459fa9f15de87fc81ed", + "sha256:2fdb638045333235166c686e1cea1b6e735af0505945690f64299a1fcaad1440", + "sha256:31469fe897314d92e221f0ce9c55cb691feff1c1a3695d057ae4562edcfa1111", + "sha256:519b282a133b6f91a13a36d48d14e8d37073774e29ae899cab87053c6102f19f", + "sha256:53bcfb9515fc01c6bf106e1852808ffd5a7ea42159a392737f5501236019beb6", + "sha256:5bf7fe1ddbfca401d409413a6844665f547a55c9473a31c575bf6d8ac5ec1e4f", + "sha256:5cd7de35adc1ea858f6aab2cbae120f4ec239c3471d31228244164446accc292", + "sha256:63b7956c75bd86deab94a2c21cfd8d1f4b87fc87f23fc7d87286c10ba8893a97", + "sha256:649f72de39564f0963c0bf5ed5398a6de4ce3bbc1355047b5c1ae3ffd6a85ad3", + "sha256:6cb6d026a1a5b4af1be0363f7fd8f6f2e26ca37143a4d0c5ecc6a517f1ee29ec", + "sha256:6fd516f741eb0cb5e92ea5dbf277e2663bfbc9b293d25bac802d74ce9409d96b", + "sha256:91f8479870a463fcd7219fedd09268ecd04350be669c1b27e73a111a4e380c0f", + "sha256:9d80f80c7dafd551ac38fe70f7fb0369e43ac9926bc92113422e79ab9de45f2d", + "sha256:b06e37816ab9afc45a1566ca4745ddfb066f8a65692230e0eabbf071d7b3a0f5", + "sha256:b2f6716f44bfaaea97783ec1738ad1ae6a5bdead10fe8f79744961caafc8ee9a", + "sha256:b3f361b461ec78a5afa294e63c8b0e18b5752ed784792ab70a7f4768963baf12", + "sha256:b6023d433d460c2106eb0bcf7ab07bc0037ae7bd8ac0080ff07e6b3911ea1097", + "sha256:b987fd7cde73d8e251ad3d3393ac232fdcd645bff809efd8c4d5ced8614544d5", + "sha256:bcaf12aea539e0952bfde3a93bd94542c8497dfcde633c89a866e1b9746d40b3", + "sha256:c62688c8189ff0b09c83bf79d1053845e6b2d3c0f5d567c3a18f109600161262", + "sha256:d39f2d1dd92ce48a176a6ccfc333ec52da20baacd77013fab1f7e99c7fe53f48", + "sha256:e893efdc3a911fe4387fb9bbc76134acb39a479237e47effea124834e97f052b", + "sha256:ecf429dee3cc73dc8a26cae5c0b2495c65d9361616ae4eb369cca61f1189a0bb", + "sha256:ed7a20865e778a17aedb2c2deeaaf21fa27a23435db4acf00fd10feb922efd8d", + "sha256:f349f978b84662c60e38e72ad56784088e9a4b0b1fbe3dff0b42982e694657d3", + "sha256:fac8d48c5afeb830f7427a3041fba0fb7a991ef05091034352b4dbca6f17f887", + "sha256:ffc9b1319b2a413e4d6b160aaa212f8dd219926bfe5181cb814c1c84c34df7f5" ], - "version": "==1.10.1" + "version": "==1.11.1" }, "fill-voids": { "hashes": [ - "sha256:00ae2663e3efbcccdb9acce555499552f7847cb93a36971bfe8483a8a6a7afff", - "sha256:0106982014c93e6466450dfd790a780f0ab0a98a71817eb1b7e2d064372dd621", - "sha256:5da32b012876aa005aa3de9056592753c90ce515b233d5a4b201971b9edc8819", - "sha256:6f5668db06b96d105a6f1ab1294ca406e996734b3f7c18f32cce905f4a3c2ebc", - "sha256:aa4ba27820ce60dc2a8edd5b3ccc48e8cf0bbb40e960410581e8b3d76dad3c98", - "sha256:b9e539c9f936f2edfbe85e13403df9ea421844bdd3ba8aec614efd55cf522cdc", - "sha256:c9bc21262de21271fce9c2ab8298871da44c7fcb3022a3592e2fa6ea732c8044", - "sha256:d4d282cb1f2048e69b623c1eef1f8a7bd0647c79ff2270eb47afacf87c58a4bd", - "sha256:d501c2f348b6ffdf084e8b324b15999284fdc4aae44ca038c91fc5eab9440d03" + "sha256:023d05596ec0b787181d6b98b908d719efa13929f93286183c8a9f2382e9cc9d", + "sha256:100fc27558947e48e907765b0ad79f18f3a742bc2b264e608b99488a4758847b", + "sha256:15edc426869b01f1c4acd0d86e5fb7655274df7f42a3fe0d362570ff8be97643", + "sha256:1e29bdfee2c8e7cbc5a7a4411a3fd12f52e66366759ec820875c24912deeecf9", + "sha256:1e552c601f242aa22d94dcbc197fd79a0b1f399a08c62e6643fc096938ac3be1", + "sha256:2b0dd7a4ac2a12deba24ff9a3473cb68aec91c3c26433ff3a8ccf238f1c68859", + "sha256:33218a08af797bcd5161d7c81e5c3c1c4a41873376c971da3f4859b3871b64bd", + "sha256:36187a1be097d65403d7ec23aedf1c4166396a830ac12d3fdbbb42c37d21bf91", + "sha256:401d48044b29434810ac151375c321cfa1046fb5a446b2a1854134db8c14a818", + "sha256:4f263d1022fc15fe500b0e9fb55dc5715388c7c4b144bfde45d10f3d84c4db89", + "sha256:5da10ad65381a55662878e556ba8f2eef461611bc2eb77b8f7a1398f176ea367", + "sha256:65ba51f9636ab86ee77f19756323b499383b936e2cbb4b3c5eb71f3d893c070d", + "sha256:6bc275cd26208f27d43f1eaea28dab14e87d89710d675a49a24d2262076e87ad", + "sha256:7ecb363a301b8f52f0727ed48f6161f5833d6058cad7994f3a7cfe6d08ad62f8", + "sha256:869dc6476b92dc608d6235088c36319cfd4be2633728afe97b1bdfbf6498f878", + "sha256:92dac48a735437c7d3631b82cd2b81a53c18a7c617eb0c1f8b0c46a6f37f7e7f", + "sha256:a4f17b5ef5e97c52fa5cd13f2e5588d55a37f6a887c747fac9995d7b2ff8903c", + "sha256:a92f83aaf894995b05e90f0279cb7b8e2083abe3143908bff9cb2a5419de2916", + "sha256:b398ff02191063dd45b71b57658d6a8d8643258515a782daad29cf8de1290b9a", + "sha256:ba04a1e63041e5dcd5b9055772d6e28054325288c658938597eabea153f0fb13", + "sha256:caa4d88965854328a360ce9f073fe3ff86d5d4fd5757058f7278dabcd75bcb95", + "sha256:d15e8270f5b578c027dc6d2c75f0273917f6b2ecbf703f66d2601d3ecbc7aeb1", + "sha256:d2390cf76983147d7e4dd471dfb4666463c74d17ab0854e1991dd95de202388b", + "sha256:dea95f11d8a9b092fede1e264414c3efd360e78471c26cd83da997994790dca7", + "sha256:dfb01ce6af548d8b8427bbd4f1aeadf3858fdc0a245154a49890c7c4e65a9d69", + "sha256:f1b9426b90e5d5e9cc4dbb3dae1f7031abca62001f9d12daf7163b5c695c739b", + "sha256:f56070dfd1b57042b04ad7229457affcce5b7c566a2967c72be8b0dfe5c6dd9a", + "sha256:f57f651f673d2500aa7f0d86bbbcab56113a7afccd10b351ac1a55d9990f797d", + "sha256:fad9df6460cd63fa8855ff5e9b2510eb16d209332722190cc1ecbc295699c6c5" ], "index": "pypi", - "version": "==1.1.0" - }, - "future": { - "hashes": [ - "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - ], - "version": "==0.18.2" + "version": "==2.0.1" }, "imageio": { "hashes": [ - "sha256:1e4ab29b3775bb093c7a35854a0412857145450183344678829b30e72263b001", - "sha256:fb5fd6d3d17126bbaac9af29fe340e2c97a196eb9416d4f28c0e543744a152cf" + "sha256:3604d751f03002e8e0e7650aa71d8d9148144a87daf17cb1f3228e80747f2e6b", + "sha256:52ddbaeca2dccf53ba2d6dec5676ca7bc3b2403ef8b37f7da78b7654bb3e10f0" ], - "version": "==2.8.0" + "version": "==2.9.0" }, "kiwisolver": { "hashes": [ - "sha256:03662cbd3e6729f341a97dd2690b271e51a67a68322affab12a5b011344b973c", - "sha256:18d749f3e56c0480dccd1714230da0f328e6e4accf188dd4e6884bdd06bf02dd", - "sha256:247800260cd38160c362d211dcaf4ed0f7816afb5efe56544748b21d6ad6d17f", - "sha256:443c2320520eda0a5b930b2725b26f6175ca4453c61f739fef7a5847bd262f74", - "sha256:4eadb361baf3069f278b055e3bb53fa189cea2fd02cb2c353b7a99ebb4477ef1", - "sha256:556da0a5f60f6486ec4969abbc1dd83cf9b5c2deadc8288508e55c0f5f87d29c", - "sha256:603162139684ee56bcd57acc74035fceed7dd8d732f38c0959c8bd157f913fec", - "sha256:60a78858580761fe611d22127868f3dc9f98871e6fdf0a15cc4203ed9ba6179b", - "sha256:7cc095a4661bdd8a5742aaf7c10ea9fac142d76ff1770a0f84394038126d8fc7", - "sha256:c31bc3c8e903d60a1ea31a754c72559398d91b5929fcb329b1c3a3d3f6e72113", - "sha256:c955791d80e464da3b471ab41eb65cf5a40c15ce9b001fdc5bbc241170de58ec", - "sha256:d069ef4b20b1e6b19f790d00097a5d5d2c50871b66d10075dab78938dc2ee2cf", - "sha256:d52b989dc23cdaa92582ceb4af8d5bcc94d74b2c3e64cd6785558ec6a879793e", - "sha256:e586b28354d7b6584d8973656a7954b1c69c93f708c0c07b77884f91640b7657", - "sha256:efcf3397ae1e3c3a4a0a0636542bcad5adad3b1dd3e8e629d0b6e201347176c8", - "sha256:fccefc0d36a38c57b7bd233a9b485e2f1eb71903ca7ad7adacad6c28a56d62d2" + "sha256:0cd53f403202159b44528498de18f9285b04482bab2a6fc3f5dd8dbb9352e30d", + "sha256:1e1bc12fb773a7b2ffdeb8380609f4f8064777877b2225dec3da711b421fda31", + "sha256:225e2e18f271e0ed8157d7f4518ffbf99b9450fca398d561eb5c4a87d0986dd9", + "sha256:232c9e11fd7ac3a470d65cd67e4359eee155ec57e822e5220322d7b2ac84fbf0", + "sha256:31dfd2ac56edc0ff9ac295193eeaea1c0c923c0355bf948fbd99ed6018010b72", + "sha256:33449715e0101e4d34f64990352bce4095c8bf13bed1b390773fc0a7295967b3", + "sha256:401a2e9afa8588589775fe34fc22d918ae839aaaf0c0e96441c0fdbce6d8ebe6", + "sha256:44a62e24d9b01ba94ae7a4a6c3fb215dc4af1dde817e7498d901e229aaf50e4e", + "sha256:50af681a36b2a1dee1d3c169ade9fdc59207d3c31e522519181e12f1b3ba7000", + "sha256:563c649cfdef27d081c84e72a03b48ea9408c16657500c312575ae9d9f7bc1c3", + "sha256:5989db3b3b34b76c09253deeaf7fbc2707616f130e166996606c284395da3f18", + "sha256:5a7a7dbff17e66fac9142ae2ecafb719393aaee6a3768c9de2fd425c63b53e21", + "sha256:5c3e6455341008a054cccee8c5d24481bcfe1acdbc9add30aa95798e95c65621", + "sha256:5f6ccd3dd0b9739edcf407514016108e2280769c73a85b9e59aa390046dbf08b", + "sha256:72c99e39d005b793fb7d3d4e660aed6b6281b502e8c1eaf8ee8346023c8e03bc", + "sha256:78751b33595f7f9511952e7e60ce858c6d64db2e062afb325985ddbd34b5c131", + "sha256:834ee27348c4aefc20b479335fd422a2c69db55f7d9ab61721ac8cd83eb78882", + "sha256:8be8d84b7d4f2ba4ffff3665bcd0211318aa632395a1a41553250484a871d454", + "sha256:950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248", + "sha256:a357fd4f15ee49b4a98b44ec23a34a95f1e00292a139d6015c11f55774ef10de", + "sha256:a53d27d0c2a0ebd07e395e56a1fbdf75ffedc4a05943daf472af163413ce9598", + "sha256:acef3d59d47dd85ecf909c359d0fd2c81ed33bdff70216d3956b463e12c38a54", + "sha256:b38694dcdac990a743aa654037ff1188c7a9801ac3ccc548d3341014bc5ca278", + "sha256:b9edd0110a77fc321ab090aaa1cfcaba1d8499850a12848b81be2222eab648f6", + "sha256:c08e95114951dc2090c4a630c2385bef681cacf12636fb0241accdc6b303fd81", + "sha256:c5518d51a0735b1e6cee1fdce66359f8d2b59c3ca85dc2b0813a8aa86818a030", + "sha256:c8fd0f1ae9d92b42854b2979024d7597685ce4ada367172ed7c09edf2cef9cb8", + "sha256:ca3820eb7f7faf7f0aa88de0e54681bddcb46e485beb844fcecbcd1c8bd01689", + "sha256:cf8b574c7b9aa060c62116d4181f3a1a4e821b2ec5cbfe3775809474113748d4", + "sha256:d3155d828dec1d43283bd24d3d3e0d9c7c350cdfcc0bd06c0ad1209c1bbc36d0", + "sha256:f8d6f8db88049a699817fd9178782867bf22283e3813064302ac59f61d95be05", + "sha256:fd34fbbfbc40628200730bc1febe30631347103fc8d3d4fa012c21ab9c11eca9" ], - "version": "==1.2.0" + "markers": "python_version >= '3.6'", + "version": "==1.3.1" }, "matplotlib": { "hashes": [ - "sha256:2466d4dddeb0f5666fd1e6736cc5287a4f9f7ae6c1a9e0779deff798b28e1d35", - "sha256:282b3fc8023c4365bad924d1bb442ddc565c2d1635f210b700722776da466ca3", - "sha256:4bb50ee4755271a2017b070984bcb788d483a8ce3132fab68393d1555b62d4ba", - "sha256:56d3147714da5c7ac4bc452d041e70e0e0b07c763f604110bd4e2527f320b86d", - "sha256:7a9baefad265907c6f0b037c8c35a10cf437f7708c27415a5513cf09ac6d6ddd", - "sha256:aae7d107dc37b4bb72dcc45f70394e6df2e5e92ac4079761aacd0e2ad1d3b1f7", - "sha256:af14e77829c5b5d5be11858d042d6f2459878f8e296228c7ea13ec1fd308eb68", - "sha256:c1cf735970b7cd424502719b44288b21089863aaaab099f55e0283a721aaf781", - "sha256:ce378047902b7a05546b6485b14df77b2ff207a0054e60c10b5680132090c8ee", - "sha256:d35891a86a4388b6965c2d527b9a9f9e657d9e110b0575ca8a24ba0d4e34b8fc", - "sha256:e06304686209331f99640642dee08781a9d55c6e32abb45ed54f021f46ccae47", - "sha256:e20ba7fb37d4647ac38f3c6d8672dd8b62451ee16173a0711b37ba0ce42bf37d", - "sha256:f4412241e32d0f8d3713b68d3ca6430190a5e8a7c070f1c07d7833d8c5264398", - "sha256:ffe2f9cdcea1086fc414e82f42271ecf1976700b8edd16ca9d376189c6d93aee" + "sha256:1de0bb6cbfe460725f0e97b88daa8643bcf9571c18ba90bb8e41432aaeca91d6", + "sha256:1e850163579a8936eede29fad41e202b25923a0a8d5ffd08ce50fc0a97dcdc93", + "sha256:215e2a30a2090221a9481db58b770ce56b8ef46f13224ae33afe221b14b24dc1", + "sha256:348e6032f666ffd151b323342f9278b16b95d4a75dfacae84a11d2829a7816ae", + "sha256:3d2eb9c1cc254d0ffa90bc96fde4b6005d09c2228f99dfd493a4219c1af99644", + "sha256:3e477db76c22929e4c6876c44f88d790aacdf3c3f8f3a90cb1975c0bf37825b0", + "sha256:451cc89cb33d6652c509fc6b588dc51c41d7246afdcc29b8624e256b7663ed1f", + "sha256:46b1a60a04e6d884f0250d5cc8dc7bd21a9a96c584a7acdaab44698a44710bab", + "sha256:5f571b92a536206f7958f7cb2d367ff6c9a1fa8229dc35020006e4cdd1ca0acd", + "sha256:672960dd114e342b7c610bf32fb99d14227f29919894388b41553217457ba7ef", + "sha256:7310e353a4a35477c7f032409966920197d7df3e757c7624fd842f3eeb307d3d", + "sha256:746a1df55749629e26af7f977ea426817ca9370ad1569436608dc48d1069b87c", + "sha256:7c155437ae4fd366e2700e2716564d1787700687443de46bcb895fe0f84b761d", + "sha256:9265ae0fb35e29f9b8cc86c2ab0a2e3dcddc4dd9de4b85bf26c0f63fe5c1c2ca", + "sha256:94bdd1d55c20e764d8aea9d471d2ae7a7b2c84445e0fa463f02e20f9730783e1", + "sha256:9a79e5dd7bb797aa611048f5b70588b23c5be05b63eefd8a0d152ac77c4243db", + "sha256:a17f0a10604fac7627ec82820439e7db611722e80c408a726cd00d8c974c2fb3", + "sha256:a1acb72f095f1d58ecc2538ed1b8bca0b57df313b13db36ed34b8cdf1868e674", + "sha256:aa49571d8030ad0b9ac39708ee77bd2a22f87815e12bdee52ecaffece9313ed8", + "sha256:c24c05f645aef776e8b8931cb81e0f1632d229b42b6d216e30836e2e145a2b40", + "sha256:cf3a7e54eff792f0815dbbe9b85df2f13d739289c93d346925554f71d484be78", + "sha256:d738acfdfb65da34c91acbdb56abed46803db39af259b7f194dc96920360dbe4", + "sha256:e15fa23d844d54e7b3b7243afd53b7567ee71c721f592deb0727ee85e668f96a", + "sha256:ed4a9e6dcacba56b17a0a9ac22ae2c72a35b7f0ef0693aa68574f0b2df607a89", + "sha256:f44149a0ef5b4991aaef12a93b8e8d66d6412e762745fea1faa61d98524e0ba9" ], - "version": "==3.2.1" + "markers": "python_version >= '3.6'", + "version": "==3.3.4" }, "networkx": { "hashes": [ - "sha256:cdfbf698749a5014bf2ed9db4a07a5295df1d3a53bf80bf3cbd61edf9df05fa1", - "sha256:f8f4ff0b6f96e4f9b16af6b84622597b5334bf9cae8cf9b2e42e7985d5c95c64" + "sha256:7978955423fbc9639c10498878be59caf99b44dc304c2286162fd24b458c1602", + "sha256:8c5812e9f798d37c50570d15c4a69d5710a18d77bafc903ee9c5fba7454c616c" ], - "version": "==2.4" + "markers": "python_version >= '3.6'", + "version": "==2.5" }, "numpy": { "hashes": [ - "sha256:00d7b54c025601e28f468953d065b9b121ddca7fff30bed7be082d3656dd798d", - "sha256:02ec9582808c4e48be4e93cd629c855e644882faf704bc2bd6bbf58c08a2a897", - "sha256:0e6f72f7bb08f2f350ed4408bb7acdc0daba637e73bce9f5ea2b207039f3af88", - "sha256:1be2e96314a66f5f1ce7764274327fd4fb9da58584eaff00b5a5221edefee7d6", - "sha256:2466fbcf23711ebc5daa61d28ced319a6159b260a18839993d871096d66b93f7", - "sha256:2b573fcf6f9863ce746e4ad00ac18a948978bb3781cffa4305134d31801f3e26", - "sha256:3f0dae97e1126f529ebb66f3c63514a0f72a177b90d56e4bce8a0b5def34627a", - "sha256:50fb72bcbc2cf11e066579cb53c4ca8ac0227abb512b6cbc1faa02d1595a2a5d", - "sha256:57aea170fb23b1fd54fa537359d90d383d9bf5937ee54ae8045a723caa5e0961", - "sha256:709c2999b6bd36cdaf85cf888d8512da7433529f14a3689d6e37ab5242e7add5", - "sha256:7d59f21e43bbfd9a10953a7e26b35b6849d888fc5a331fa84a2d9c37bd9fe2a2", - "sha256:904b513ab8fbcbdb062bed1ce2f794ab20208a1b01ce9bd90776c6c7e7257032", - "sha256:96dd36f5cdde152fd6977d1bbc0f0561bccffecfde63cd397c8e6033eb66baba", - "sha256:9933b81fecbe935e6a7dc89cbd2b99fea1bf362f2790daf9422a7bb1dc3c3085", - "sha256:bbcc85aaf4cd84ba057decaead058f43191cc0e30d6bc5d44fe336dc3d3f4509", - "sha256:dccd380d8e025c867ddcb2f84b439722cf1f23f3a319381eac45fd077dee7170", - "sha256:e22cd0f72fc931d6abc69dc7764484ee20c6a60b0d0fee9ce0426029b1c1bdae", - "sha256:ed722aefb0ebffd10b32e67f48e8ac4c5c4cf5d3a785024fdf0e9eb17529cd9d", - "sha256:efb7ac5572c9a57159cf92c508aad9f856f1cb8e8302d7fdb99061dbe52d712c", - "sha256:efdba339fffb0e80fcc19524e4fdbda2e2b5772ea46720c44eaac28096d60720", - "sha256:f22273dd6a403ed870207b853a856ff6327d5cbce7a835dfa0645b3fc00273ec" + "sha256:032be656d89bbf786d743fee11d01ef318b0781281241997558fa7950028dd29", + "sha256:104f5e90b143dbf298361a99ac1af4cf59131218a045ebf4ee5990b83cff5fab", + "sha256:125a0e10ddd99a874fd357bfa1b636cd58deb78ba4a30b5ddb09f645c3512e04", + "sha256:12e4ba5c6420917571f1a5becc9338abbde71dd811ce40b37ba62dec7b39af6d", + "sha256:13adf545732bb23a796914fe5f891a12bd74cf3d2986eed7b7eba2941eea1590", + "sha256:2d7e27442599104ee08f4faed56bb87c55f8b10a5494ac2ead5c98a4b289e61f", + "sha256:3bc63486a870294683980d76ec1e3efc786295ae00128f9ea38e2c6e74d5a60a", + "sha256:3d3087e24e354c18fb35c454026af3ed8997cfd4997765266897c68d724e4845", + "sha256:4ed8e96dc146e12c1c5cdd6fb9fd0757f2ba66048bf94c5126b7efebd12d0090", + "sha256:60759ab15c94dd0e1ed88241fd4fa3312db4e91d2c8f5a2d4cf3863fad83d65b", + "sha256:65410c7f4398a0047eea5cca9b74009ea61178efd78d1be9847fac1d6716ec1e", + "sha256:66b467adfcf628f66ea4ac6430ded0614f5cc06ba530d09571ea404789064adc", + "sha256:7199109fa46277be503393be9250b983f325880766f847885607d9b13848f257", + "sha256:72251e43ac426ff98ea802a931922c79b8d7596480300eb9f1b1e45e0543571e", + "sha256:89e5336f2bec0c726ac7e7cdae181b325a9c0ee24e604704ed830d241c5e47ff", + "sha256:89f937b13b8dd17b0099c7c2e22066883c86ca1575a975f754babc8fbf8d69a9", + "sha256:9c94cab5054bad82a70b2e77741271790304651d584e2cdfe2041488e753863b", + "sha256:9eb551d122fadca7774b97db8a112b77231dcccda8e91a5bc99e79890797175e", + "sha256:a1d7995d1023335e67fb070b2fae6f5968f5be3802b15ad6d79d81ecaa014fe0", + "sha256:ae61f02b84a0211abb56462a3b6cd1e7ec39d466d3160eb4e1da8bf6717cdbeb", + "sha256:b9410c0b6fed4a22554f072a86c361e417f0258838957b78bd063bde2c7f841f", + "sha256:c26287dfc888cf1e65181f39ea75e11f42ffc4f4529e5bd19add57ad458996e2", + "sha256:c91ec9569facd4757ade0888371eced2ecf49e7982ce5634cc2cf4e7331a4b14", + "sha256:ecb5b74c702358cdc21268ff4c37f7466357871f53a30e6f84c686952bef16a9" ], "index": "pypi", - "version": "==1.18.4" + "version": "==1.20.1" }, "pillow": { "hashes": [ - "sha256:04766c4930c174b46fd72d450674612ab44cca977ebbcc2dde722c6933290107", - "sha256:0e2a3bceb0fd4e0cb17192ae506d5f082b309ffe5fc370a5667959c9b2f85fa3", - "sha256:0f01e63c34f0e1e2580cc0b24e86a5ccbbfa8830909a52ee17624c4193224cd9", - "sha256:12e4bad6bddd8546a2f9771485c7e3d2b546b458ae8ff79621214119ac244523", - "sha256:1f694e28c169655c50bb89a3fa07f3b854d71eb47f50783621de813979ba87f3", - "sha256:3d25dd8d688f7318dca6d8cd4f962a360ee40346c15893ae3b95c061cdbc4079", - "sha256:4b02b9c27fad2054932e89f39703646d0c543f21d3cc5b8e05434215121c28cd", - "sha256:9744350687459234867cbebfe9df8f35ef9e1538f3e729adbd8fde0761adb705", - "sha256:a0b49960110bc6ff5fead46013bcb8825d101026d466f3a4de3476defe0fb0dd", - "sha256:ae2b270f9a0b8822b98655cb3a59cdb1bd54a34807c6c56b76dd2e786c3b7db3", - "sha256:b37bb3bd35edf53125b0ff257822afa6962649995cbdfde2791ddb62b239f891", - "sha256:b532bcc2f008e96fd9241177ec580829dee817b090532f43e54074ecffdcd97f", - "sha256:b67a6c47ed963c709ed24566daa3f95a18f07d3831334da570c71da53d97d088", - "sha256:b943e71c2065ade6fef223358e56c167fc6ce31c50bc7a02dd5c17ee4338e8ac", - "sha256:ccc9ad2460eb5bee5642eaf75a0438d7f8887d484490d5117b98edd7f33118b7", - "sha256:d23e2aa9b969cf9c26edfb4b56307792b8b374202810bd949effd1c6e11ebd6d", - "sha256:eaa83729eab9c60884f362ada982d3a06beaa6cc8b084cf9f76cae7739481dfa", - "sha256:ee94fce8d003ac9fd206496f2707efe9eadcb278d94c271f129ab36aa7181344", - "sha256:f455efb7a98557412dc6f8e463c1faf1f1911ec2432059fa3e582b6000fc90e2", - "sha256:f46e0e024346e1474083c729d50de909974237c72daca05393ee32389dabe457", - "sha256:f54be399340aa602066adb63a86a6a5d4f395adfdd9da2b9a0162ea808c7b276", - "sha256:f784aad988f12c80aacfa5b381ec21fd3f38f851720f652b9f33facc5101cf4d" + "sha256:15306d71a1e96d7e271fd2a0737038b5a92ca2978d2e38b6ced7966583e3d5af", + "sha256:1940fc4d361f9cc7e558d6f56ff38d7351b53052fd7911f4b60cd7bc091ea3b1", + "sha256:1f93f2fe211f1ef75e6f589327f4d4f8545d5c8e826231b042b483d8383e8a7c", + "sha256:30d33a1a6400132e6f521640dd3f64578ac9bfb79a619416d7e8802b4ce1dd55", + "sha256:328240f7dddf77783e72d5ed79899a6b48bc6681f8d1f6001f55933cb4905060", + "sha256:46c2bcf8e1e75d154e78417b3e3c64e96def738c2a25435e74909e127a8cba5e", + "sha256:5762ebb4436f46b566fc6351d67a9b5386b5e5de4e58fdaa18a1c83e0e20f1a8", + "sha256:5a2d957eb4aba9d48170b8fe6538ec1fbc2119ffe6373782c03d8acad3323f2e", + "sha256:5cf03b9534aca63b192856aa601c68d0764810857786ea5da652581f3a44c2b0", + "sha256:5daba2b40782c1c5157a788ec4454067c6616f5a0c1b70e26ac326a880c2d328", + "sha256:63cd413ac52ee3f67057223d363f4f82ce966e64906aea046daf46695e3c8238", + "sha256:6efac40344d8f668b6c4533ae02a48d52fd852ef0654cc6f19f6ac146399c733", + "sha256:71b01ee69e7df527439d7752a2ce8fb89e19a32df484a308eca3e81f673d3a03", + "sha256:71f31ee4df3d5e0b366dd362007740106d3210fb6a56ec4b581a5324ba254f06", + "sha256:72027ebf682abc9bafd93b43edc44279f641e8996fb2945104471419113cfc71", + "sha256:74cd9aa648ed6dd25e572453eb09b08817a1e3d9f8d1bd4d8403d99e42ea790b", + "sha256:81b3716cc9744ffdf76b39afb6247eae754186838cedad0b0ac63b2571253fe6", + "sha256:8565355a29655b28fdc2c666fd9a3890fe5edc6639d128814fafecfae2d70910", + "sha256:87f42c976f91ca2fc21a3293e25bd3cd895918597db1b95b93cbd949f7d019ce", + "sha256:89e4c757a91b8c55d97c91fa09c69b3677c227b942fa749e9a66eef602f59c28", + "sha256:8c4e32218c764bc27fe49b7328195579581aa419920edcc321c4cb877c65258d", + "sha256:903293320efe2466c1ab3509a33d6b866dc850cfd0c5d9cc92632014cec185fb", + "sha256:90882c6f084ef68b71bba190209a734bf90abb82ab5e8f64444c71d5974008c6", + "sha256:98afcac3205d31ab6a10c5006b0cf040d0026a68ec051edd3517b776c1d78b09", + "sha256:a01da2c266d9868c4f91a9c6faf47a251f23b9a862dce81d2ff583135206f5be", + "sha256:aeab4cd016e11e7aa5cfc49dcff8e51561fa64818a0be86efa82c7038e9369d0", + "sha256:b07c660e014852d98a00a91adfbe25033898a9d90a8f39beb2437d22a203fc44", + "sha256:bead24c0ae3f1f6afcb915a057943ccf65fc755d11a1410a909c1fefb6c06ad1", + "sha256:d1d6bca39bb6dd94fba23cdb3eeaea5e30c7717c5343004d900e2a63b132c341", + "sha256:e2cd8ac157c1e5ae88b6dd790648ee5d2777e76f1e5c7d184eaddb2938594f34", + "sha256:e5739ae63636a52b706a0facec77b2b58e485637e1638202556156e424a02dc2", + "sha256:f36c3ff63d6fc509ce599a2f5b0d0732189eed653420e7294c039d342c6e204a", + "sha256:f91b50ad88048d795c0ad004abbe1390aa1882073b1dca10bfd55d0b8cf18ec5" ], - "version": "==7.1.2" + "markers": "python_version >= '3.6'", + "version": "==8.1.2" }, "pydicom": { "hashes": [ - "sha256:9488495a9f3e202d1219f7cb165aee0de31efd512d938c0226d34147ce860391", - "sha256:f315ba2296346f4f9913c269618201e170b9326362e2ada6041ca91b7cb2117b" + "sha256:65f36820c5fec24b4e7ca45b7dae93e054ed269d55f92681863d39d30459e2fd", + "sha256:d97f53a7b269dbd7414d18342f1b70f80d7d35dc4e479316bab146daac0e0c15" ], "index": "pypi", - "version": "==1.4.2" + "version": "==2.1.2" }, "pyparsing": { "hashes": [ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "python-dateutil": { @@ -201,6 +274,7 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.1" }, "pywavelets": { @@ -208,14 +282,22 @@ "sha256:076ca8907001fdfe4205484f719d12b4a0262dfe6652fa1cfc3c5c362d14dc84", "sha256:18a51b3f9416a2ae6e9a35c4af32cf520dd7895f2b69714f4aa2f4342fca47f9", "sha256:1a64b40f6acb4ffbaccce0545d7fc641744f95351f62e4c6aaa40549326008c9", + "sha256:2b634a54241c190ee989a4af87669d377b37c91bcc9cf0efe33c10ff847f7841", + "sha256:2f7429eeb5bf9c7068002d0d7f094ed654c77a70ce5e6198737fd68ab85f8311", "sha256:35959c041ec014648575085a97b498eafbbaa824f86f6e4a59bfdef8a3fe6308", + "sha256:39c74740718e420d38c78ca4498568fa57976d78d5096277358e0fa9629a7aea", + "sha256:411e17ca6ed8cf5e18a7ca5ee06a91c25800cc6c58c77986202abf98d749273a", "sha256:55e39ec848ceec13c9fa1598253ae9dd5c31d09dfd48059462860d2b908fb224", "sha256:6162dc0ae04669ea04b4b51420777b9ea2d30b0a9d02901b2a3b4d61d159c2e9", "sha256:68b5c33741d26c827074b3d8f0251de1c3019bb9567b8d303eb093c822ce28f1", + "sha256:6bc78fb9c42a716309b4ace56f51965d8b5662c3ba19d4591749f31773db1125", + "sha256:6ebfefebb5c6494a3af41ad8c60248a95da267a24b79ed143723d4502b1fe4d7", "sha256:720dbcdd3d91c6dfead79c80bf8b00a1d8aa4e5d551dc528c6d5151e4efc3403", + "sha256:732bab78435c48be5d6bc75486ef629d7c8f112e07b313bf1f1a2220ab437277", "sha256:7947e51ca05489b85928af52a34fe67022ab5b81d4ae32a4109a99e883a0635e", "sha256:79f5b54f9dc353e5ee47f0c3f02bebd2c899d49780633aa771fed43fa20b3149", "sha256:80b924edbc012ded8aa8b91cb2fd6207fb1a9a3a377beb4049b8a07445cec6f0", + "sha256:83c5e3eb78ce111c2f0b45f46106cc697c3cb6c4e5f51308e1f81b512c70c8fb", "sha256:889d4c5c5205a9c90118c1980df526857929841df33e4cd1ff1eff77c6817a65", "sha256:935ff247b8b78bdf77647fee962b1cc208c51a7b229db30b9ba5f6da3e675178", "sha256:98b2669c5af842a70cfab33a7043fcb5e7535a690a00cd251b44c9be0be418e5", @@ -223,138 +305,176 @@ "sha256:bc5e87b72371da87c9bebc68e54882aada9c3114e640de180f62d5da95749cd3", "sha256:be105382961745f88d8196bba5a69ee2c4455d87ad2a2e5d1eed6bd7fda4d3fd", "sha256:c06d2e340c7bf8b9ec71da2284beab8519a3908eab031f4ea126e8ccfc3fd567", + "sha256:c2a799e79cee81a862216c47e5623c97b95f1abee8dd1f9eed736df23fb653fb", "sha256:cfe79844526dd92e3ecc9490b5031fca5f8ab607e1e858feba232b1b788ff0ea", "sha256:d510aef84d9852653d079c84f2f81a82d5d09815e625f35c95714e7364570ad4", "sha256:e02a0558e0c2ac8b8bbe6a6ac18c136767ec56b96a321e0dfde2173adfa5a504" ], + "markers": "python_version >= '3.5'", "version": "==1.1.1" }, "scikit-image": { "hashes": [ - "sha256:063d1c20fcd53762f82ee58c29783ae4e8f6fbed445b41b704fa33b6f355729d", - "sha256:0715b7940778ba5d73da3908d60ddf2eb93863f7c394493a522fe56d3859295c", - "sha256:0808ab5f8218d91a1c008036993636535a37efd67a52ab0f2e6e3f4b7e75aeda", - "sha256:2a54bea469eb1b611bee1ce36e60710f5f94f29205bc5bd67a51793909b1e62b", - "sha256:2aa962aa82d815606d7dad7f045f5d7ca55c65b4320d47e15a98fc92612c2d6c", - "sha256:2d346d49b6852cffb47cbde995e2696d5b07f688d8c057a0a4548abf3a98f920", - "sha256:3ad2efa792ab8de5fcefe6f4f5bc1ab64c411cdb5c829ce1526ab3a5a7729627", - "sha256:3af3d781ce085573ced37b2b5b9abfd32ce3d4723bd17f37e829025d189b0421", - "sha256:41e28db0136f29ecd305bef0408fdfc64be9d415e54f5099a95555c65f5c1865", - "sha256:6786b127f33470fd843e644435522fbf43bce05c9f5527946c390ccb9e1cac27", - "sha256:8b2b768b02c6b7476f2e16ddd91f827d3817aef73f82cf28bff7a8dcdfd8c55c", - "sha256:a48fb0d34a090b578b87ffebab0fe035295c1945dbc2b28e1a55ea2cf6031751", - "sha256:dd7fbd32da74d4e9967dc15845f731f16e7966cee61f5dc0e12e2abb1305068c", - "sha256:e18d73cc8893e2268b172c29f9aab530faf8cd3b7c11ae0bee3e763d719d35c5", - "sha256:e774377876cb258e8f4d63f7809863f961c98aa02263b3ff54a39483bc6f7d26" + "sha256:1256017c513e8e1b8b9da73e5fd1e605d0077bbbc8e5c8d6c2cab36400131c6c", + "sha256:1cd05c882ffb2a271a1f20b4afe937d63d55b8753c3d652f11495883a7800ebe", + "sha256:23f9178b21c752bfb4e4ea3a3fa0ff79bc5a401bc75ddb4661f2cebd1c2b0e24", + "sha256:2c058770c6ad6e0fe6c30f59970c9c65fa740ff014d121d8c341664cd792cf49", + "sha256:2eea42706a25ae6e0cebaf1914e2ab1c04061b1f3c9966d76025d58a2e9188fc", + "sha256:30447af3f5b7c9491f2d3db5bc275493d1b91bf1dd16b67e2fd79a6bb95d8ee9", + "sha256:3515b890e771f99bbe1051a0dcfe0fc477da961da933c34f89808a0f1eeb7dc2", + "sha256:5f602779258807d03e72c0a439cfb221f647e628be166fb3594397435f13c76b", + "sha256:76446e2402e64d7dba78eeae8aa86e92a0cafe5b1c9e6235bd8d067471ed2788", + "sha256:ae6659b3a8bd4bba7e9dcbfd0064e443b32c7054bf09174749db896730fcf42e", + "sha256:c700336a7f96109c74154090c5e693693a8e3fa09ed6156a5996cdc9a3bb1534", + "sha256:d5ad4a9b4c9797d4c4c48f45fa224c5ebff22b9b0af636c3ecb8addbb66c21e6", + "sha256:d746540cafe7776c6d05a0b40ec744bb8d33d1ddc51faba601d26c02593d8bcc", + "sha256:e972c628ad9ba52c298b032368e29af9bd5eeb81ce33bc2d9b039a81661c99c5", + "sha256:ec25e4110951d3a280421bb10dd510a082ba83d86e20d706294faf7899cdb3d5", + "sha256:fbb618ca911867bce45574c1639618cdfb5d94e207432b19bc19563d80d2f171" ], "index": "pypi", - "version": "==0.16.2" + "version": "==0.18.1" }, "scipy": { "hashes": [ - "sha256:00af72998a46c25bdb5824d2b729e7dabec0c765f9deb0b504f928591f5ff9d4", - "sha256:0902a620a381f101e184a958459b36d3ee50f5effd186db76e131cbefcbb96f7", - "sha256:1e3190466d669d658233e8a583b854f6386dd62d655539b77b3fa25bfb2abb70", - "sha256:2cce3f9847a1a51019e8c5b47620da93950e58ebc611f13e0d11f4980ca5fecb", - "sha256:3092857f36b690a321a662fe5496cb816a7f4eecd875e1d36793d92d3f884073", - "sha256:386086e2972ed2db17cebf88610aab7d7f6e2c0ca30042dc9a89cf18dcc363fa", - "sha256:71eb180f22c49066f25d6df16f8709f215723317cc951d99e54dc88020ea57be", - "sha256:770254a280d741dd3436919d47e35712fb081a6ff8bafc0f319382b954b77802", - "sha256:787cc50cab3020a865640aba3485e9fbd161d4d3b0d03a967df1a2881320512d", - "sha256:8a07760d5c7f3a92e440ad3aedcc98891e915ce857664282ae3c0220f3301eb6", - "sha256:8d3bc3993b8e4be7eade6dcc6fd59a412d96d3a33fa42b0fa45dc9e24495ede9", - "sha256:9508a7c628a165c2c835f2497837bf6ac80eb25291055f56c129df3c943cbaf8", - "sha256:a144811318853a23d32a07bc7fd5561ff0cac5da643d96ed94a4ffe967d89672", - "sha256:a1aae70d52d0b074d8121333bc807a485f9f1e6a69742010b33780df2e60cfe0", - "sha256:a2d6df9eb074af7f08866598e4ef068a2b310d98f87dc23bd1b90ec7bdcec802", - "sha256:bb517872058a1f087c4528e7429b4a44533a902644987e7b2fe35ecc223bc408", - "sha256:c5cac0c0387272ee0e789e94a570ac51deb01c796b37fb2aad1fb13f85e2f97d", - "sha256:cc971a82ea1170e677443108703a2ec9ff0f70752258d0e9f5433d00dda01f59", - "sha256:dba8306f6da99e37ea08c08fef6e274b5bf8567bb094d1dbe86a20e532aca088", - "sha256:dc60bb302f48acf6da8ca4444cfa17d52c63c5415302a9ee77b3b21618090521", - "sha256:dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59" + "sha256:0c8a51d33556bf70367452d4d601d1742c0e806cd0194785914daf19775f0e67", + "sha256:0e5b0ccf63155d90da576edd2768b66fb276446c371b73841e3503be1d63fb5d", + "sha256:2481efbb3740977e3c831edfd0bd9867be26387cacf24eb5e366a6a374d3d00d", + "sha256:33d6b7df40d197bdd3049d64e8e680227151673465e5d85723b3b8f6b15a6ced", + "sha256:5da5471aed911fe7e52b86bf9ea32fb55ae93e2f0fac66c32e58897cfb02fa07", + "sha256:5f331eeed0297232d2e6eea51b54e8278ed8bb10b099f69c44e2558c090d06bf", + "sha256:5fa9c6530b1661f1370bcd332a1e62ca7881785cc0f80c0d559b636567fab63c", + "sha256:6725e3fbb47da428794f243864f2297462e9ee448297c93ed1dcbc44335feb78", + "sha256:68cb4c424112cd4be886b4d979c5497fba190714085f46b8ae67a5e4416c32b4", + "sha256:794e768cc5f779736593046c9714e0f3a5940bc6dcc1dba885ad64cbfb28e9f0", + "sha256:83bf7c16245c15bc58ee76c5418e46ea1811edcc2e2b03041b804e46084ab627", + "sha256:8e403a337749ed40af60e537cc4d4c03febddcc56cd26e774c9b1b600a70d3e4", + "sha256:a15a1f3fc0abff33e792d6049161b7795909b40b97c6cc2934ed54384017ab76", + "sha256:a423533c55fec61456dedee7b6ee7dce0bb6bfa395424ea374d25afa262be261", + "sha256:a5193a098ae9f29af283dcf0041f762601faf2e595c0db1da929875b7570353f", + "sha256:bd50daf727f7c195e26f27467c85ce653d41df4358a25b32434a50d8870fc519", + "sha256:c4fceb864890b6168e79b0e714c585dbe2fd4222768ee90bc1aa0f8218691b11", + "sha256:e79570979ccdc3d165456dd62041d9556fb9733b86b4b6d818af7a0afc15f092", + "sha256:f46dd15335e8a320b0fb4685f58b7471702234cba8bb3442b69a3e1dc329c345" ], "index": "pypi", - "version": "==1.4.1" + "version": "==1.6.1" }, "simpleitk": { "hashes": [ - "sha256:0d5b60a090bd978b63238a77b97e4aaf109499048ff7a50b23c0dc9159abfb37", - "sha256:124482011dedef350860ed0d76dcf9cd35d75455d424a2922e6c8d527c716fd6", - "sha256:1be0eb4f33f99618829a94bd86e850df1203edbbd13ccca91f2f4e3937b99f44", - "sha256:1ebc7961008f6926163d803ca42eec251e87e3601c16cfd7b95147d6ea8857a0", - "sha256:2bc13c4566f34a255e7041633a358f4050b5ef0aefde957033f846429a957bb1", - "sha256:3ca6e5f798121bb4c86214a480f74c9211d8d9def7081778083ed97502f37892", - "sha256:3f5df96c52392d83fbf9abd47b542e01a9bcaacfb7ca40bae218701038b94c4b", - "sha256:41103b814c4f1fed7f6d3c96a11426c35d20d0983e2534de1795c7e4481efc14", - "sha256:53e06515eae75baa7c6ad0a205206fa1835f5d57d9afb1996ed0b49f31133d8f", - "sha256:56c03426f48107624c16ce13ecf689a55d7c5b170dd0096bda6494f1d52b5fa5", - "sha256:695561d683da3c0d7f009d700e860a885d8dd2ded487fcbfe444c3e54c6bdfb5", - "sha256:69a6e0781ea419efb4340b26c65edf977e18a4c9d296d82ecc733efc3f9ca082", - "sha256:6bf3d32db2b3d9da0ffb2d988bb6d75e86afd6b54a51a6828d4a7ba98117ab7a", - "sha256:74c2467f8c755076e49416e6c07d195bdfc06ea39b6143ceda19460e0d8c9e0b", - "sha256:859421aded539f96c022c289120db21cf7e9dadf59652e52dcc18d87c5cd70e4", - "sha256:884857528ad1d710f44429cc78c580ee5c51f0a5bbb205a4ed10012d722cfde5", - "sha256:95601f4fb95336fb0ccd7c93dba5888760fb8ff614aba8a255176722ce03e7d9", - "sha256:9efe874383b159a06a5b7845dbca4dfa8ba7d620bc9c0d2fd2e6e52b74ab6890", - "sha256:a24729c714eeaa1a6c29df3ffb6e1928d2f4b7556a5790728fa5ab766dcd153d", - "sha256:a9acfa5c79229086b38bb710adf3a3588b7c5c5949f1053898762a484ceed2aa", - "sha256:bb41e103381981404bee82cf884c56b22633e7c8d29984c1bb2aa1bbe32f6a06", - "sha256:bdc1521ee7e197e8019b80abc8039790a170c6ea1b76f091fbe424a56327afbf", - "sha256:bfc2efde7474bcd406c12830a30099a6fec129114aa670063ba95b1989bafe6b", - "sha256:cb23db770935eb63c99961862fca21a8daef394cc570e928a780d657d91506a6", - "sha256:cf1ede8cf5aaa6ba714604a4a9bd22238499b40489caee2ad59c0c9e9c741a44", - "sha256:cfbb53a2c6a9de22884baec878ed7847229e9e2060fe221951290dd5cbb91867", - "sha256:d69aecb47550e2c50b05db889546b8c5b780336057cbd9771a2ac20a04118fb5", - "sha256:dc52a622d4ec6accb2179a405553aaac61157e2691b16b33563498c5c7d9ee51", - "sha256:ff94f4f48533f827b0f9d589f6a38a28aa0fd4ca8a9ba3c4ee50f31f1ce5ad14" + "sha256:09911709ae2d3e29115dce3e78fa437dd78836812306be0a252c2da120928435", + "sha256:13628c2b22679a8b36d209ebc1d0ace53fe4ab6c4e8654eff0bc96ee40f702c8", + "sha256:21bb06e640a8540d53b3ee00a8fcdcdf6e1a48aa4cf28172cc08bc153f012b76", + "sha256:46772fa3e6e167de0821b85e122debf90833d84daa23c5c66053cf28437f4573", + "sha256:4728c090a2e95b169ef8edab42f068fcb8657cac1d3d98df805ca468d9c45c38", + "sha256:5ab5ab167d27bb24e958f02df26b467603197b71e91b13b1635763cf64d2431f", + "sha256:6522c9e6a24301d0886f5e452724f165e0bd521548a9795b5bdc62031e950d1d", + "sha256:666b7b88bc53c07d012181fa5306134d2d837cc59bc99e5c6641954f81c6501a", + "sha256:6efe188b0f375f35734b272fe06863731d9ab08f9f0ff3e4bc342f941cf4ca08", + "sha256:73caad7fb842985abc0ccf3c2590fd4e66e2b66e846b2eb17b759ffe4cc0455c", + "sha256:8d795689bc613907196b1dc322e3b6247ec19c8e94cc12704a267d017551cb61", + "sha256:95070b5cd4293586aa788edf79593d1b9600d2c55ffe641920090f58dd69b995", + "sha256:a49b02bd405a3630be5388c0cafdcee951a8e8a81351fcca9e55b6b1b76f0ff9", + "sha256:cb969855ea1cd14839b10755a9b3cc1528cc912d4d5cc151c04f46fbcbd416c2", + "sha256:dc077928ab993170da5eed27f4737c9325a9fe705ff871945d0a6d6f15e24fab", + "sha256:e0be3a611b447fb923ebfaacc3ca1ce42d09aa31882086efdb792329e9ab123b", + "sha256:ed444d72a6a5f4870077a1ddf376974ac927afe0a2b7c8a34d359b074ac21c2d", + "sha256:f83fdde9eb91d0b01af73e64e22d65b26dbaf1edf6e6220a2ab21123229e0863", + "sha256:fa87ed3d73732a4668d8e216aac6e6d547ec92b566681a5d34ca5b7d86c569dc", + "sha256:fac923ee2c3c09dcee9b2a80c0d2bd886765a0727eba7a3befa3a36a8e17170f" ], "index": "pypi", - "version": "==1.2.4" + "version": "==2.0.2" }, "six": { "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "version": "==1.14.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.15.0" + }, + "tifffile": { + "hashes": [ + "sha256:8ae99b2d7a80512628dc7f7de5a178525b28cb50cc69e82578a67106c28beee6", + "sha256:f55a4c8bcbfdd28157529c2e2a7c066da1636a202144f1696092b9290f52685d" + ], + "markers": "python_version >= '3.7'", + "version": "==2021.3.5" }, "torch": { "hashes": [ - "sha256:3cc72d36eaeda96488e3a29373f739b887338952417b3e1620871063bf5d14d2", - "sha256:402951484443bb49b5bc2129414ac6c644c07b8378e79922cf3645fd08cbfdc9", - "sha256:6fcfe5deaf0788bbe8639869d3c752ff5fe1bdedce11c7ed2d44379b1fbe6d6c", - "sha256:7f3d6af2d7e2576b9640aa684f0c18a773efffe8b37f9056272287345c1dcba5", - "sha256:865d4bec21542647e0822e8b753e05d67eee874974a3937273f710edd99a7516", - "sha256:931b79aed9aba50bf314214be6efaaf7972ea9539a3d63f82622bc5860a1fd81", - "sha256:cb4412c6b00117ab5e014d07dac45b87f1e918e31fbb849e7e39f1f9140fff59", - "sha256:dfaac4c5d27ac80705956743c34fb1ab5fb37e1646a6c8e45f05f7e739f6ea7c", - "sha256:ecdc2ea4011e3ec04937b6b9e803ab671c3ac04e81b1df20354e01453e508b2f" + "sha256:05b114cb793816cd140794d5874f463972cb639f3b55d3a060f21fd066f5b629", + "sha256:08aff0383e868f1e9882b732bbe6934defab690ad1745a03d5f1a150a4e1aeba", + "sha256:1b58f70c150e066bcd7401a3bdfad661a04244817a5dac9990b5367523887d3f", + "sha256:229a8dc38059ef6c7171f3f4f49c51e8a3d9644ce6c32dcddd9f1bac888a78aa", + "sha256:2318fac860ae73dc6486c0de2223674d9ef6139fc75f157af2bf8dce4fca5524", + "sha256:287a7677df844bf2c4425698fd6d9434065211219cd7fd96000ed981c4d92288", + "sha256:394a99d777e487e773e0172cb0a0bce5b411e3090d89844e8dd55618be9bc970", + "sha256:6ecdbd4494b4bf2d31a24ddfbdff32bd995389bc8662a454bd40d3e8ce202907", + "sha256:7438431e03af793979cb1a9b5dd9f399b38461748e9f21f60e36149ee215d751", + "sha256:78b84115fd03f4587382a38b0da98cdd1827117806c80ebf97843a64213816cc", + "sha256:86f13f324fd87870bd0d37864f4f5814dc27f9e7ed9ea222f1cc7d7dc01a8ffe", + "sha256:923856c2e6e53d5a747d83ff40faadd791d27cea2fd881b8d6990ea269f47572", + "sha256:affef9bce6eed232308dd89d55d3a37a105f35460f4705375980d27154c51e24", + "sha256:b9d6c8c457b90b5167f3ab0bd1ff7193a06935533176bc6d41e1763d353e9740", + "sha256:c87c7b0fd31c331968674cb73e82396a622b06a8e20425584922b767f2ffb259", + "sha256:d98d167994d2e30df61a98eaca1684c50761f096d7f76c0c99789ac8cea50b55", + "sha256:fa1e391cca3937d5dea31f31a1a80a01bd4a8062c039448c254bbf5a58eb0787" ], "index": "pypi", - "version": "==1.5.0" + "version": "==1.8.0" }, "torchvision": { "hashes": [ - "sha256:0ea04a7e0f64599c158d36da01afd0cb3bc49033d2a145be4eb80c17c4c0482b", - "sha256:0fa9e4a8381e5e04d0da0acd93f1429347053497ec343fe6d625b1b7fb2ce36e", - "sha256:691d68f3726b7392fe37db7184aef8a6b6f7cf6ff38fae769b287b3d6e1eb69a", - "sha256:6eb4e0d7dc61030447b98d412162f222a95d848b3b0e484a81282c057af6dd25", - "sha256:8992f10a7860e0991766a788b546d5f11e3e7465e87a72eb9c78675dd2616400", - "sha256:a9b08435fdadd89520a78f5a54d196c05878d1a15e37f760d43f72f10bae308f", - "sha256:ea39bed9e9497a67c5f66e37d3d5a663a0284868ae8616de81f65c66d9ad802b", - "sha256:f43dae3b348afa5778439913ba1f3f176362ffc9e684ef01dc54dae7cf1b82e4" + "sha256:2252bc63fcccb27785726dd9d0d9a97432657a5d139390bf93cd6bdf227a4401", + "sha256:24b505dbcf3cb8da49d4b1447543c1021b699c84fc3701523101b62ee4adf097", + "sha256:421bda7131f3c0eae2260f10174ac3c49e54183b33acb927b4b572f4cd90066d", + "sha256:63052147c776d9f93385410c1d5a791386eb0cb5e1b93c7feac686f8dbe6eb06", + "sha256:874714f30822d4c1160071dac004d48ae641bfdccccbb497098c86f6589ec0f1", + "sha256:8791da742c24344646a4ac36adee9327491f7fff7607dffe352402b5bf25ea21", + "sha256:8fce78a59959f4bb4780a78c2277d617e44da7bc270bc449ff403187f6b587fc", + "sha256:b03275f351feffaf7450d234ffb57cce26ff5e696d01ef5f543de205f18849a9", + "sha256:b9f71f62725776495071b875494af86615f225b1a40902f5df452da5cfde0510", + "sha256:d85d405e8cf694c1f85da7f0496ea69dd4f8d8dafbdad1e29bcdc4c621fc5cf0", + "sha256:d90750ae76a0cad8ffb6b509b30412dcd102d27d5f34f7184b289b6687de580e", + "sha256:fa302f6e8fe33a8d5c6649e659655c0427eee662fe22ce69eb56fa402b520c26" ], "index": "pypi", - "version": "==0.6.0" + "version": "==0.9.0" }, "tqdm": { "hashes": [ - "sha256:4733c4a10d0f2a4d098d801464bdaf5240c7dadd2a7fde4ee93b0a0efd9fb25e", - "sha256:acdafb20f51637ca3954150d0405ff1a7edde0ff19e38fb99a80a66210d2a28f" + "sha256:9fdf349068d047d4cfbe24862c425883af1db29bcddf4b0eeb2524f6fbdb23c7", + "sha256:d666ae29164da3e517fcf125e41d4fe96e5bb375cd87ff9763f6b38b5592fe33" + ], + "index": "pypi", + "version": "==4.59.0" + }, + "typing-extensions": { + "hashes": [ + "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", + "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c", + "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f" + ], + "version": "==3.7.4.3" + }, + "vtk": { + "hashes": [ + "sha256:11c7b05e2a35ff5724b5c88a90ffaa1de84347ddc8293c1b74158c721db31573", + "sha256:3b0873e79365268b3b7d2acb238d2333f73209c27f54b76dc0cdd85483afa82e", + "sha256:4092bf85e1d02a76ea878bb9b822eb57ec7b73c8826e3ec29f1c8cbddcb312e3", + "sha256:424d7e6f8a216b7af82c672ebae82bc6e268582f802c7b32684ae9a90ef4c19e", + "sha256:b9d3827bf84ca11a669cf798d2a205d4ca19ed66e15e93ab2ab747f9dbe9edbe", + "sha256:bd4a066dbb4fb35d329278538976ad4440aeb0e5c839cc12310567238211971c", + "sha256:bd6efb3d3a6ead36e42ab938806364fa7dc858228a1c81e321556e43ff899d89", + "sha256:cbf17bc5ab7ccbda79458cf241cad8bc790a228dfa15066c50648bfb5d7abeb1", + "sha256:cdc7d6d556cf520e6c3c76299125a71d7be5895744ba949e2560d9332e607b50", + "sha256:e2ce620b2691ee8770bd9bfc0ae2ca99c0263ded20559c389a10b9b78e7750b2", + "sha256:e6bfc40f4cdc02f8b869b0c2023b73c6aad86fdb39fcb1823b1f4f5efd1a0001" ], "index": "pypi", - "version": "==4.46.0" + "version": "==9.0.1" }, "zipfile36": { "hashes": [ diff --git a/run.py b/run.py index d866b32..ec8ecfc 100644 --- a/run.py +++ b/run.py @@ -11,10 +11,14 @@ from utils import getImageSeriesId, readImage, dicom2nrrd -def do_prediction(input_image, force_cpu): +def do_prediction(input_image, force_cpu, lobes): # Run segmentation print("Running segmentation...") - segmentation = mask.apply(input_image, force_cpu=force_cpu) + if lobes: + print("setting lobe model") + model = mask.get_model("unet", "LTRCLobes") + + segmentation = mask.apply(input_image, model, force_cpu=force_cpu) # free memory torch.cuda.empty_cache() @@ -93,18 +97,6 @@ def maskToCSV(mask, image, tresholds, folder_path): sitk.WriteImage(out_img, os.path.join(folder_path, "lung_mask_palette.nrrd")) - # Write lungs extraction - print("Writing lungs extraction...") - image_arr = sitk.GetArrayFromImage(image) - mask[mask == 2] = 1 - lungs_arr = image_arr * mask - lungs_arr[mask == 0] = -1000 - lungs = sitk.GetImageFromArray(lungs_arr) - lungs.SetSpacing(spacing) - lungs.SetDirection(direction) - lungs.SetOrigin(origin) - sitk.WriteImage(lungs, os.path.join(folder_path, "lungs.nrrd")) - return perfusion_mask @@ -182,17 +174,26 @@ def register(image_fixed, image_move, folder_out): default=[-940, -860, -740], ) + parser.add_argument( + "--lobes", action="store_true", default=False, help="Use lobes model" + ) + + parser.add_argument( + "--mask2csv", action="store_true", default=False, help="compute csv" + ) + args = parser.parse_args() if args.dicomdir: path_image = args.dicomdir # create temp folder - temp_path = os.path.join(os.getcwd(), "temp/") - os.makedirs(temp_path, exist_ok=True) + # temp_path = os.path.join(os.getcwd(), "temp/") + # os.makedirs(temp_path, exist_ok=True) - # create path to temp files - nrrd_image_path = os.path.join(temp_path, "image.nrrd") + # # create path to temp files + # nrrd_image_path = os.path.join(temp_path, "image.nrrd") + nrrd_image_path = "./image.nrrd" # convert input dicom to nrrd image = dicom2nrrd(path_image, nrrd_image_path) @@ -206,9 +207,22 @@ def register(image_fixed, image_move, folder_out): mask = sitk.ReadImage(args.use_mask) segmentation_arr = sitk.GetArrayFromImage(mask) else: - segmentation_arr = do_prediction(image, args.force_cpu) + segmentation_arr = do_prediction(image, args.force_cpu, args.lobes) # extract only values inside the target palette - maskToCSV(segmentation_arr, image, args.thresholds, args.outfolder) + if args.mask2csv: + maskToCSV(segmentation_arr, image, args.thresholds, args.outfolder) + + # Write lungs extraction + print("Writing lungs extraction...") + image_arr = sitk.GetArrayFromImage(image) + segmentation_arr[segmentation_arr > 1] = 1 + lungs_arr = image_arr * segmentation_arr + lungs_arr[segmentation_arr == 0] = -1500 + lungs = sitk.GetImageFromArray(lungs_arr) + lungs.SetSpacing(image.GetSpacing()) + lungs.SetDirection(image.GetDirection()) + lungs.SetOrigin(image.GetOrigin()) + sitk.WriteImage(lungs, "./lungs.nrrd") print("DONE, output in:", args.outfolder) From c092dc7c008f6e281345cf7373e76ff20d9434b2 Mon Sep 17 00:00:00 2001 From: mattia-wsl Date: Fri, 9 Apr 2021 11:24:27 +0200 Subject: [PATCH 2/2] add sirways rec files --- airw.py | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++ divide.py | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ fillMask.py | 87 +++++++++++++++++++++++++++++++++ trees.py | 95 ++++++++++++++++++++++++++++++++++++ 4 files changed, 443 insertions(+) create mode 100644 airw.py create mode 100644 divide.py create mode 100644 fillMask.py create mode 100644 trees.py diff --git a/airw.py b/airw.py new file mode 100644 index 0000000..8cc8336 --- /dev/null +++ b/airw.py @@ -0,0 +1,135 @@ +# segment vascular tree and airways + +import SimpleITK as sitk +import os +import numpy as np +import argparse +import vtk + +# import itk + + +def connected_threshold(nrrd_image, seeds, tresh): + print("reading image") + segmentationfilter = sitk.ConnectedThresholdImageFilter() + segmentationfilter.SetUpper(tresh[0]) + segmentationfilter.SetLower(tresh[1]) + segmentationfilter.SetReplaceValue(1) + for i in range(0, len(seeds), 3): + seed = seeds[i : i + 3] + print(seed) + segmentationfilter.AddSeed(seed) + print("run filter") + result = segmentationfilter.Execute(nrrd_image) + return result + + +if __name__ == "__main__": + # init arg parser + + parser = argparse.ArgumentParser(description="") + + parser.add_argument( + "--image", + action="store", + default=None, + help="the image", + ) + + parser.add_argument( + "--mask", + action="store", + default=None, + help="the mask", + ) + + parser.add_argument( + "--seeds", + action="store", + nargs="+", + type=int, + help="array of xyz", + default=[], + ) + + parser.add_argument( + "--thresholds", + action="store", + nargs="+", + type=int, + help="array of upper and lower tr", + default=[], + ) + + args = parser.parse_args() + +print(args.seeds) +print(args.thresholds) + +img = sitk.ReadImage(args.image) +out_img_path = "./airw.nrrd" +# tree = connected_threshold(img, args.seeds, args.thresholds) + +seg = sitk.ConfidenceConnected( + img, + seedList=[args.seeds], + numberOfIterations=10, + multiplier=2.0, + initialNeighborhoodRadius=10, + replaceValue=1, +) + +# initial sharpening ? +# erosion, then conn tr ? + +# mask = sitk.ReadImage(args.mask) +# mask = sitk.GetArrayFromImage(mask) +# mask[mask > 1] = 1 +# tree_arr = sitk.GetArrayFromImage(tree) +# tree_arr[mask == 1] = 0 + +# outttt = sitk.GetImageFromArray(tree_arr) + +# thresholder = sitk.BinaryThresholdImageFilter() +# thresholder.SetLowerThreshold(0) +# # thresholder.SetUpperThreshold() +# thresholder.SetInsideValue(1) +# thresholder.SetOutsideValue(0) +# tree_mask = thresholder.Execute(img) + +# # closing +# closing = sitk.BinaryMorphologicalClosingImageFilter() +# closing.SetKernelRadius(1) +# closing.SetForegroundValue(1) +# closed = closing.Execute(seg) + +# # opening +opening = sitk.BinaryMorphologicalOpeningImageFilter() +opening.SetKernelRadius(2) +opening.SetForegroundValue(1) +opened = opening.Execute(seg) + +# # closing +closing = sitk.BinaryMorphologicalClosingImageFilter() +closing.SetKernelRadius(1) +closing.SetForegroundValue(1) +closed = closing.Execute(opened) + +# smooth +# smoother = sitk.MedianImageFilter() +# smoother.SetRadius([0, 0, 1]) +# smooth = smoother.Execute(opened) + +# gaussian = sitk.SmoothingRecursiveGaussianImageFilter() +# gaussian.SetSigma(1) +# smooth = gaussian.Execute(opened) + +# surface extraction + + +out = closed +out.SetSpacing(img.GetSpacing()) +out.SetDirection(img.GetDirection()) +out.SetOrigin(img.GetOrigin()) +print("writing image") +sitk.WriteImage(out, out_img_path, True) diff --git a/divide.py b/divide.py new file mode 100644 index 0000000..3a9fe29 --- /dev/null +++ b/divide.py @@ -0,0 +1,126 @@ +import SimpleITK as sitk +import numpy as np +import argparse +import os + +# divide image with same serie id but different acquisition number in the same folder +# write img_1 and img_2 in output + +if __name__ == "__main__": + # init arg parser + + parser = argparse.ArgumentParser( + description="" + ) + + parser.add_argument( + "--image", + action="store", + default=None, + help="the target image", + ) + + parser.add_argument( + "--dicomdir", + action="store", + default=None, + help="the dicom folder of target image", + ) + + parser.add_argument( + "--mask", + action="store", + default=None, + help="the mask image", + ) + + args = parser.parse_args() + + # image = sitk.ReadImage(args.image) + # mask = sitk.ReadImage(args.mask) + + # crop = sitk.CropImageFilter() + # crop.SetUpperBoundaryCropSize([0,0,23]) + # crop.SetLowerBoundaryCropSize([0,0,0]) + # res = crop.Execute(image) + + + # res = image[:, :, 200:423] + + # sitk.WriteImage(res, "./res.nrrd", True) + + # img = sitk.GetImageFromArray(image) + # msk = sitk.GetImageFromArray(mask) + + # print('done conversion') + + # out_img = img[msk] + + # print(out_img) + + def getImageSeriesId(file_name, series_list, desc_list): + print("Reading image...") + # A file name that belongs to the series we want to read + + # Read the file's meta-information without reading bulk pixel data + # print('Reading image...') + file_reader = sitk.ImageFileReader() + file_reader.SetFileName(file_name) + + try: + file_reader.ReadImageInformation() + except: + print("ERROR while reading: ", file_name) + print("SKIP file") + return + + # Get the sorted file names, opens all files in the directory and reads the meta-information + # without reading the bulk pixel data + series_ID = file_reader.GetMetaData("0020|000e") + description = file_reader.GetMetaData("0008|103e") + # print('seriesId', series_ID, '\t\t descr', description) + + if series_ID not in series_list: + series_list.append(series_ID) + desc_list.append(description) + + return series_ID + + def divideByAcqNumber(file_names): + seriesObject = [[],[]] + + for file_name in file_names: + file_reader = sitk.ImageFileReader() + file_reader.SetFileName(file_name) + + try: + file_reader.ReadImageInformation() + except: + print("ERROR while reading: ", file_name) + print("SKIP file") + return + + acqNumber = file_reader.GetMetaData("0020|0012") + print(acqNumber, file_name) + seriesObject[int(acqNumber)-1].append(file_name) + + return seriesObject + + path_image = args.dicomdir + + for (root, dirs, files) in os.walk(path_image): + series_id = getImageSeriesId(os.path.join(root, files[0]), [], []) + + sorted_file_names = sitk.ImageSeriesReader.GetGDCMSeriesFileNames( + path_image, series_id + ) + + obj = divideByAcqNumber(sorted_file_names) + + image1 = sitk.ReadImage(obj[0]) + image2 = sitk.ReadImage(obj[1]) + + sitk.WriteImage(image1, "./image1.nrrd", True) + sitk.WriteImage(image2, "./image2.nrrd", True) + + diff --git a/fillMask.py b/fillMask.py new file mode 100644 index 0000000..0e046b8 --- /dev/null +++ b/fillMask.py @@ -0,0 +1,87 @@ +import SimpleITK as sitk +import numpy as np +import argparse + +if __name__ == "__main__": + # init arg parser + + parser = argparse.ArgumentParser(description="") + + parser.add_argument( + "--mask", + action="store", + default=None, + help="the binary lung mask", + ) + + parser.add_argument( + "--image", + action="store", + default=None, + help="the original image", + ) + + args = parser.parse_args() + + mask = sitk.ReadImage(args.mask) + mask_arr = sitk.GetArrayFromImage(mask) + + out_mask = mask + + dims = mask.GetSize() + + def fill_line(k, j, arr_in, arr_out): + fill = False + for i in range(arr_in.shape[2]): + px0 = arr_in[k, j, i] + px1 = arr_in[k, j, i + 1] + if px0 == 1 and px1 == 0: + fill = True + if fill: + arr_out[k, j, i] = 3 + if fill and px0 == 0 and px1 == 2: # right lung value is 2 + break + + llv = 1 + rlv = 2 + + out_arr = np.copy(mask_arr) + + for k in range(mask_arr.shape[0]): + for j in range(mask_arr.shape[1]): + row = mask_arr[k, j, :] + if (llv in row) and (rlv in row): + print(k, j) + fill_line(k, j, mask_arr, out_arr) + + # binarize! + out_arr[out_arr == 2] = 1 + out_arr[out_arr == 3] = 1 + + spacing = mask.GetSpacing() + direction = mask.GetDirection() + origin = mask.GetOrigin() + + out_mask = sitk.GetImageFromArray(out_arr) + out_mask.SetSpacing(spacing) + out_mask.SetDirection(direction) + out_mask.SetOrigin(origin) + + # close little holes + filler = sitk.BinaryFillholeImageFilter() + filler.SetForegroundValue(1) + filled_mask = filler.Execute(out_mask) + + sitk.WriteImage(filled_mask, "./filled_mask.nrrd") + + if args.image: + img = sitk.ReadImage(args.image) + img_arr = sitk.GetArrayFromImage(img) + o_arr = np.zeros(img_arr.shape) + o_arr = o_arr - 1500 # background value + o_arr[out_arr == 1] = img_arr[out_arr == 1] + out_img = sitk.GetImageFromArray(o_arr) + out_img.SetDirection(img.GetDirection()) + out_img.SetSpacing(img.GetSpacing()) + out_img.SetOrigin(img.GetOrigin()) + sitk.WriteImage(out_img, "./filled_lungs.nrrd") diff --git a/trees.py b/trees.py new file mode 100644 index 0000000..980ed57 --- /dev/null +++ b/trees.py @@ -0,0 +1,95 @@ +# segment vascular tree and airways + +import SimpleITK as sitk +import os +import numpy as np +import argparsew +import vtk + +# import itk + + +def connected_threshold(nrrd_image, seeds, tresh): + print("reading image") + segmentationfilter = sitk.ConnectedThresholdImageFilter() + segmentationfilter.SetUpper(tresh[0]) + segmentationfilter.SetLower(tresh[1]) + segmentationfilter.SetReplaceValue(1) + for i in range(0, len(seeds), 3): + seed = seeds[i : i + 3] + print(seed) + segmentationfilter.AddSeed(seed) + print("run filter") + result = segmentationfilter.Execute(nrrd_image) + return result + + +if __name__ == "__main__": + # init arg parser + + parser = argparse.ArgumentParser(description="") + + parser.add_argument( + "--image", + action="store", + default=None, + help="the image", + ) + + parser.add_argument( + "--seeds", + action="store", + nargs="+", + type=int, + help="array of xyz", + default=[], + ) + + parser.add_argument( + "--thresholds", + action="store", + nargs="+", + type=int, + help="array of upper and lower tr", + default=[], + ) + + args = parser.parse_args() + +print(args.seeds) +print(args.thresholds) + +img = sitk.ReadImage(args.image) +out_img_path = "./tree.nrrd" +# tree = connected_threshold(img, args.seeds, args.thresholds) + +thresholder = sitk.BinaryThresholdImageFilter() +thresholder.SetLowerThreshold(0) +# thresholder.SetUpperThreshold() +thresholder.SetInsideValue(1) +thresholder.SetOutsideValue(0) +tree_mask = thresholder.Execute(img) + +# closing +opening = sitk.BinaryMorphologicalClosingImageFilter() +opening.SetKernelRadius(1) +opening.SetForegroundValue(1) +opened = opening.Execute(tree_mask) + +# smooth +# smoother = sitk.MedianImageFilter() +# smoother.SetRadius([0, 0, 1]) +# smooth = smoother.Execute(opened) +gaussian = sitk.SmoothingRecursiveGaussianImageFilter() +gaussian.SetSigma(1) +smooth = gaussian.Execute(opened) + +# surface extraction + + +out = smooth +out.SetSpacing(img.GetSpacing()) +out.SetDirection(img.GetDirection()) +out.SetOrigin(img.GetOrigin()) +print("writing image") +sitk.WriteImage(out, out_img_path, True)