$ python RunUseCase.py --use_case ๋ํด๊ณจ --groom_images
...
์
๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/com_aligned/images/m03_L_1x_hip.isores.pad.com.nrrd
์ถ๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/center/images/m03_L_1x_hip.isores.pad.com.center.nrrd
์
๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/com_aligned/images/m04_L_1x_hip.isores.pad.com.nrrd
.....
์
๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/com_aligned/images/n19_L_1x_hip.isores.pad.com.nrrd
์ถ๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/center/images/n19_L_1x_hip.isores.pad.com.center.nrrd
์
๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/com_aligned/images/n19_R_1x_hip.reflect.isores.pad.com.nrrd
์ถ๋ ฅ ํ์ผ ์ด๋ฆ: Output/femur/groomed/center/images/n19_R_1x_hip.reflect.isores.pad.com.center.nrrd
zsh: ๋ถํ ์ค๋ฅ python RunUseCase.py --use_case ๋ํด๊ณจ --groom_images
์ด๊ฒ์ RC10์ด ์ค์น๋ MacOS์ ์์์ต๋๋ค.
tiny_test์ ์ถฉ๋ํฉ๋๊น?
tiny_test๋ ์ถฉ๋ํ์ง ์์ต๋๋ค.
์์ ํ ์คํธ์์ ๋ํด๊ณจ๋ง ๋จ์๊ธฐ ๋๋ฌธ์ ๋ฐ์ฌ๋ ๋ํด๊ณจ๊ณผ ๊ด๋ จ์ด ์์ ์ ์์ต๋๋ค.
์ ๋ฐ์ดํธ: ๋ ๋ฒ ํ์ธํ๋๋ฐ Linux์์ ์๋ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
์ผ์ชฝ ๋ํด๊ณจ 2๊ฐ์ ์ค๋ฅธ์ชฝ ๋ํด๊ณจ 1๊ฐ๋ก tiny_test๋ฅผ ์คํํด ๋ณด์์ต๋๋ค. ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x000000016b8612ad libvnl_algo.dylib`vnl_qr<double>::vnl_qr(this=0x00007ffeefbfd568, M=0x00007ffeefbfd6f0) at vnl_qr.hxx:51:24 [opt]
frame #1: 0x000000016b85cf1d libvnl_algo.dylib`double vnl_determinant<double>(M=<unavailable>, balance=<unavailable>) at vnl_determinant.hxx:107:14 [opt]
frame #2: 0x00000003dec807ac _ITKIOImageBasePython.so`___lldb_unnamed_symbol9961$$_ITKIOImageBasePython.so + 252
frame #3: 0x00000003deba7ff4 _ITKIOImageBasePython.so`___lldb_unnamed_symbol7056$$_ITKIOImageBasePython.so + 132
frame #4: 0x00000003dec80586 _ITKIOImageBasePython.so`___lldb_unnamed_symbol9956$$_ITKIOImageBasePython.so + 38
frame #5: 0x00000003dea1d188 _ITKIOImageBasePython.so`___lldb_unnamed_symbol1480$$_ITKIOImageBasePython.so + 1560
frame #6: 0x00000003ded50753 _ITKIOImageBasePython.so`itk::ProcessObject::UpdateOutputInformation() + 351
frame #7: 0x00000003dec7fec2 _ITKIOImageBasePython.so`___lldb_unnamed_symbol9945$$_ITKIOImageBasePython.so + 70
frame #8: 0x00000003ded5b6f4 _ITKIOImageBasePython.so`itk::DataObject::Update() + 18
frame #9: 0x000000041a65c177 _ITKCommonPython.so`___lldb_unnamed_symbol8759$$_ITKCommonPython.so + 58
frame #10: 0x000000010002c843 python`_PyMethodDef_RawFastCallKeywords + 131
frame #11: 0x000000010002c1d6 python`_PyObject_FastCallKeywords + 598
frame #12: 0x0000000100164bb7 python`call_function + 455
frame #13: 0x000000010015c604 python`_PyEval_EvalFrameDefault + 20180
frame #14: 0x0000000100155f04 python`_PyEval_EvalCodeWithName + 532
frame #15: 0x000000010002c5e3 python`_PyFunction_FastCallKeywords + 403
frame #16: 0x0000000100164aa7 python`call_function + 183
frame #17: 0x000000010015c604 python`_PyEval_EvalFrameDefault + 20180
frame #18: 0x000000010002c535 python`_PyFunction_FastCallKeywords + 229
frame #19: 0x0000000100164aa7 python`call_function + 183
frame #20: 0x000000010015cdb0 python`_PyEval_EvalFrameDefault + 22144
frame #21: 0x0000000100155f04 python`_PyEval_EvalCodeWithName + 532
frame #22: 0x000000010002c5e3 python`_PyFunction_FastCallKeywords + 403
frame #23: 0x0000000100164aa7 python`call_function + 183
frame #24: 0x000000010015c604 python`_PyEval_EvalFrameDefault + 20180
frame #25: 0x0000000100155f04 python`_PyEval_EvalCodeWithName + 532
frame #26: 0x00000001001c1afb python`PyRun_FileExFlags + 235
frame #27: 0x00000001001c14c6 python`PyRun_SimpleFileExFlags + 502
frame #28: 0x00000001001ede30 python`pymain_run_file + 160
frame #29: 0x00000001001ed72b python`pymain_run_filename + 123
frame #30: 0x00000001001ecf11 python`pymain_run_python + 145
frame #31: 0x00000001001ecb8b python`pymain_main + 27
frame #32: 0x00000001000018c9 python`main + 89
frame #33: 0x00007fff6aedfcc9 libdyld.dylib`start + 1
frame #34: 0x00007fff6aedfcc9 libdyld.dylib`start + 1
#1168๊ณผ ๊ด๋ จ์ด ์์ต๋๊น?
ITKIOImageBasePython.so๊ฐ ์ด ์คํ ์ถ์ ์ ํ์๋๋ ์ด์ ๋ ๋ฌด์์ ๋๊น? ๋๋ ์ฐ๋ฆฌ๊ฐ shapeworks python ๋ฐ์ธ๋ฉ(์: Image ํด๋์ค)์ ์ฌ์ฉํ๊ณ ์๋ค๊ณ ์๊ฐํ์ต๋๊น?
๋ํ ์ผ๋ถ ๊ฒฝ๊ณ lldb๋ ์ถฉ๋ ์ง์ ์ ๋ฑ์์ต๋๋ค.
2021-03-25 11:57:01.360622-0600 python[22532:5953417] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj3EEE.
2021-03-25 11:57:01.360667-0600 python[22532:5953417] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N3itk10DataObjectE, N3itk5ImageIfLj3EEE, N3itk9ImageBaseILj3EEE.
2021-03-25 11:57:01.905525-0600 python[22532:5953417] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj3EEE.
2021-03-25 11:57:01.905556-0600 python[22532:5953417] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N3itk10DataObjectE, N3itk5ImageIfLj3EEE, N3itk9ImageBaseILj3EEE.
2021-03-25 11:57:02.113545-0600 python[22532:5953417] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj3EEE.
2021-03-25 11:57:02.113577-0600 python[22532:5953417] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N3itk10DataObjectE, N3itk5ImageIfLj3EEE, N3itk9ImageBaseILj3EEE.
2021-03-25 11:57:02.646500-0600 python[22532:5953417] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj3EEE.
2021-03-25 11:57:02.646531-0600 python[22532:5953417] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N3itk10DataObjectE, N3itk5ImageIfLj3EEE, N3itk9ImageBaseILj3EEE.
2021-03-25 11:57:03.535838-0600 python[22532:5953417] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj3EEE.
2021-03-25 11:57:03.535870-0600 python[22532:5953417] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N3itk10DataObjectE, N3itk5ImageIfLj3EEE, N3itk9ImageBaseILj3EEE.
2021-03-25 11:57:05.224328-0600 python[22532:5953417] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj3EEE.
2021-03-25 11:57:05.224362-0600 python[22532:5953417] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N3itk10DataObjectE, N3itk5ImageIfLj3EEE, N3itk9ImageBaseILj3EEE.
์ข์ฌ๋ฐฉ ์ ์ค ์ผ์ด์ค์ ์ผํฐ๋ง ๋จ๊ณ์์๋ ์ด๋ฐ ์ผ์ด ๋ฐ์ํฉ๋๊น?
๋๋ฒ๊ทธ์์๋ ์ถฉ๋์ด ๋ฐ์ํฉ๋๊น? ์ ์ฒด ์คํ ์ถ์ ์ ๊ณต๊ฐํ ์ ์์ต๋๋ค. ๋ถํฐ
์ด๋ฏธ์ง๋ itk::Image ShapeWorks ์ด๋ฏธ์ง ํจ์์ ๋ํ ์ผ๋ถ ํธ์ถ์ ์ค์ฌ์ผ๋ก ๊ตฌ์ถ๋ฉ๋๋ค.
๋จ์ํ ์ต์ ํ ๋ ์ ์์ต๋๋ค.
์ค๋์ ์ ๋ฉ๋ฆฌ (๊ฐ์ง๊ฐ ์์ ์๋ ์์) ๋ด๊ฐ ๋ง๋ค๋ ค๊ณ ํ๋
build_dependencies์์ itk์ ํจ๊ป itk์ Python ๋ฐ์ธ๋ฉ, ํ์ง๋ง
์ฑ๊ณต์ ์ธ. ํนํ conda/pip๊ฐ
ํนํ itk python ์ ์ฒด๊ฐ ์๋ ์ผ๋ถ ๋ฒ์ ์ ๋ค๋ฅธ ๋ฒ์ ์ค์น
๊ตฌ์ฑ ์์(5.0 ๋ฐ 5.1), ๋ฌธ์ ์ ๋ํ ๋
ธ๊ณจ์ ์ธ ๋ฐฉ๋ฒ.
2021๋
3์ 25์ผ ๋ชฉ์์ผ ์ค์ 11:59 Alan Morris @ . * >
์ผ๋ค:
- ์ค๋ ๋ #1, ๋๊ธฐ์ด = 'com.apple.main-thread', ์ค์ง ์ด์ = EXC_BAD_ACCESS(์ฝ๋=1, ์ฃผ์=0x0)
- ํ๋ ์ #0: 0x000000016b8612ad libvnl_algo.dylib
vnl_qr<double>::vnl_qr(this=0x00007ffeefbfd568, M=0x00007ffeefbfd6f0) at vnl_qr.hxx:51:24 [opt] frame #1: 0x000000016b85cf1d libvnl_algo.dylib
์ด์ค vnl_determinant(M= , ๊ท ํ= ) vnl_determinant์์. hxx:107 :14 [์ ํ]
ํ๋ ์ #2: 0x00000003dec807ac _ITKIOImageBasePython.so___lldb_unnamed_symbol9961$$_ITKIOImageBasePython.so + 252 frame #3: 0x00000003deba7ff4 _ITKIOImageBasePython.so
___lldb_unnamed_symbol7056$$_ITKIOImageBasePython.so + 132
ํ๋ ์ #4: 0x00000003dec80586 _ITKIOImageBasePython.so___lldb_unnamed_symbol9956$$_ITKIOImageBasePython.so + 38 frame #5: 0x00000003dea1d188 _ITKIOImageBasePython.so
___lldb_unnamed_symbol1480$$_ITKIOImageBasePython.so + 1560
ํ๋ ์ #6: 0x00000003ded50753 _ITKIOImageBasePython.soitk::ProcessObject::UpdateOutputInformation() + 351 frame #7: 0x00000003dec7fec2 _ITKIOImageBasePython.so
___lldb_unnamed_symbol9945$$_ITKIOImageBasePython.so + 70
ํ๋ ์ #8: 0x00000003ded5b6f4 _ITKIOImageBasePython.soitk::DataObject::Update() + 18 frame #9: 0x000000041a65c177 _ITKCommonPython.so
___lldb_unnamed_symbol8759$$_ITKCommonPython.so + 58
ํ๋ ์ #10: 0x000000010002c843 ํ์ด์ฌ_PyMethodDef_RawFastCallKeywords + 131 frame #11: 0x000000010002c1d6 python
_PyObject_FastCallKeywords + 598
ํ๋ ์ #12: 0x0000000100164bb7 ํ์ด์ฌcall_function + 455 frame #13: 0x000000010015c604 python
_PyEval_EvalFrameDefault + 20180
ํ๋ ์ #14: 0x0000000100155f04 ํ์ด์ฌ_PyEval_EvalCodeWithName + 532 frame #15: 0x000000010002c5e3 python
_PyFunction_FastCallKeywords + 403
ํ๋ ์ #16: 0x0000000100164aa7 ํ์ด์ฌcall_function + 183 frame #17: 0x000000010015c604 python
_PyEval_EvalFrameDefault + 20180
ํ๋ ์ #18: 0x000000010002c535 ํ์ด์ฌ_PyFunction_FastCallKeywords + 229 frame #19: 0x0000000100164aa7 python
call_function + 183
ํ๋ ์ #20: 0x000000010015cdb0 ํ์ด์ฌ_PyEval_EvalFrameDefault + 22144 frame #21: 0x0000000100155f04 python
_PyEval_EvalCodeWithName + 532
ํ๋ ์ #22: 0x000000010002c5e3 ํ์ด์ฌ_PyFunction_FastCallKeywords + 403 frame #23: 0x0000000100164aa7 python
call_function + 183
ํ๋ ์ #24: 0x000000010015c604 ํ์ด์ฌ_PyEval_EvalFrameDefault + 20180 frame #25: 0x0000000100155f04 python
_PyEval_EvalCodeWithName + 532
ํ๋ ์ #26: 0x00000001001c1afb ํ์ด์ฌPyRun_FileExFlags + 235 frame #27: 0x00000001001c14c6 python
PyRun_SimpleFileExFlags + 502
ํ๋ ์ #28: 0x00000001001ede30 ํ์ด์ฌpymain_run_file + 160 frame #29: 0x00000001001ed72b python
pymain_run_filename + 123
ํ๋ ์ #30: 0x00000001001ecf11 ํ์ด์ฌpymain_run_python + 145 frame #31: 0x00000001001ecb8b python
pymain_main + 27
ํ๋ ์ #32: 0x00000001000018c9 ํ์ด์ฌmain + 89 frame #33: 0x00007fff6aedfcc9 libdyld.dylib
์์ + 1
ํ๋ ์ #34: 0x00007fff6aedfcc9 libdyld.dylib`start + 1#1168๊ณผ ๊ด๋ จ์ด ์์ต๋๊น?
https://github.com/SCIInstitute/ShapeWorks/issues/1168โ
๋น์ ์ด ์ง์ ๋์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๋ ๊ฒ์ ๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธํ์ธ์.
https://github.com/SCIInstitute/ShapeWorks/issues/1179#issuecomment-807193351 ,
๋๋ ๊ตฌ๋ ์ทจ์
https://github.com/notifications/unsubscribe-auth/AAJT3EKCRFSERHDJ5XDPHCDTFN2ZPANCNFSM4ZZUXDBQ
.
์ ๋ฐ์ดํธ. ์ข์, ๋๋ ํ์ด์ฌ ์ถ๋ ฅ์ ํผ๋์ค๋ฌ์ ๋ค. ๋ ์ด์์ ์ถ๋ ฅ์ด ์์๊ธฐ ๋๋ฌธ์ ๊ทธ๊ฒ์ด ์ฌ์ ํ ์ค์ ๋จ๊ณ์ ์๋ค๊ณ ๊ฐ์ ํ๋ค. FindReferenceImage์์ ์ถฉ๋์ด ๋ฐ์ํฉ๋๋ค.
dim = itk.GetArrayFromImage(itk.imread(inDataList[i])).shape
๋ด ์๊ฐ์ ๋ฌธ์ ๋ ๋ฉ๋ชจ๋ฆฌ์ ๋ก๋๋ ๋ ๊ฐ์ ๋ค๋ฅธ ITK ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋ค๋ ๊ฒ์ ๋๋ค. ๐
์์ฃผ ์ค๋์ ์ (๋ถ๊ธฐ๊ฐ ๋ ์ด์ ์กด์ฌํ์ง ์์ ์ ์์) build_dependencies์์ itk์ ํจ๊ป itk์ Python ๋ฐ์ธ๋ฉ์ ๋น๋ํ๋ ค๊ณ ์๋ํ์ง๋ง ์ฑ๊ณตํ์ง ๋ชปํ์ต๋๋ค. ํนํ conda/pip๊ฐ ๋ฌธ์ ์ ๋ ธ๊ณจ์ ์ธ ๋ ์ํผ์ธ itk python ๊ตฌ์ฑ ์์(5.0 ๋ฐ 5.1)์ ์ผ๋ถ(์ ๋ถ๋ ์๋์ง๋ง ์ผ๋ถ)์ ๋ค๋ฅธ ๋ฒ์ ์ ์ค์นํ๊ณ ์๊ธฐ ๋๋ฌธ์ ํ ๋ฒ ๋ ์๋ํด ๋ณผ ๊ฐ์น๊ฐ ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์๋ค๋ ๋ฐ ๋์ํ์ง๋ง #1168์ ์ด๋ป์ต๋๊น? ๊ทธ๋ฐ ๋ค์ ์ฒ์๋ถํฐ itkwidgets๋ฅผ ๋น๋ํ๊ณ ITK๋ก ๋น๋๋๋๋ก ์ ๊ณตํด์ผ ํฉ๋๊น?
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์๋ค๋ ๋ฐ ๋์ํ์ง๋ง #1168์ ์ด๋ป์ต๋๊น? ๊ทธ๋ฐ ๋ค์ ์ฒ์๋ถํฐ itkwidgets๋ฅผ ๋น๋ํ๊ณ ITK๋ก ๋น๋๋๋๋ก ์ ๊ณตํด์ผ ํฉ๋๊น?
์ด๊ฒ์ด ๊ณต์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฌธ์ ์ธ ๊ฒฝ์ฐ ๋
ธํธ๋ถ์ ์คํํ๊ธฐ ์ ์ LD_LIBRARY_PATH๋ฅผ ์ค์ ํ ์ ์์ต๋๋ค.
์
๋ฐ์ดํธ: ๋๋ ์ด๊ฒ์ ์๋ํ๊ณ ๊ฒฐ๊ณผ๋ ๋์ผํ์ต๋๋ค
update2: ์ ๋ #1168 ์ฌ์ฉ ์ฌ๋ก๋ง ์๋ํ๊ณ ์ด๋ฒ ์ฌ๋ก๋ ์๋ํ์ง ์์์ต๋๋ค.
FindReferenceImage์์ ์ถฉ๋์ด ๋ฐ์ํฉ๋๋ค.
dim = itk.GetArrayFromImage(itk.imread(inDataList[i])).shape
ShapeWorks๋ ์ด ํธ์ถ์ ๊ด์ฌํ์ง ์์ต๋๋ค. pdb
ํตํด ์ด๊ฒ์ ์คํํ์ฌ ๋ ๋ง์ ์ ๋ณด๋ฅผ ์ ๋ฆฌํ ์ ์๋์ง ๊ถ๊ธํฉ๋๋ค.
python -m pub RunUseCase.py --use_case femur --groom_images
(๊ทธ๋ฐ ๋ค์ 'r'์ ๋๋ฌ ์คํ)
(์ง๊ธ ์ด๊ฒ์ ์คํํ๊ณ ์์ต๋๋ค. ์ถฉ๋ํ๋ ๋ฐ ์ผ๋ง๋ ๊ฑธ๋ฆฝ๋๊น? ์ด๊ฒ์ ์ค์ผ ์ ์๋ ์ฌ๋์ด ์์ต๋๊น?)
์
๋ฐ์ดํธ: ์๊ฐ์ด ์ค๋ ๊ฑธ๋ฆฌ์ง๋ง(~1์๊ฐ) ์ธ๊ทธ ์ค๋ฅ๋ง ๋ณด๊ณ ํ๊ณ ์ฌ์ฉ์๋ฅผ ๋๋ฒ๊ฑฐ์ ๋์ง ์๋๋ค๋ ์ ์์ ๋ ์ ์ฉํฉ๋๋ค. ์ธ๋ถ ์คํฌ๋ฆฝํธ์ ๋ํ ํธ์ถ์ด ํ์๋์ง ์์ ํผ๋์ค๋ฝ์ต๋๋ค.
๋ฌธ์ ๋ python ITK ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ๋น๋๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋ VXL ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ํด๊ฒฐํ๊ณ ํธ์ถํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
* frame #0: 0x000000016b8612ad libvnl_algo.dylib`vnl_qr<double>::vnl_qr(this=0x00007ffeefbfd568, M=0x00007ffeefbfd6f0) at vnl_qr.hxx:51:24 [opt]
frame #1: 0x000000016b85cf1d libvnl_algo.dylib`double vnl_determinant<double>(M=<unavailable>, balance=<unavailable>) at vnl_determinant.hxx:107:14 [opt]
frame #2: 0x00000003dec807ac _ITKIOImageBasePython.so`___lldb_unnamed_symbol9961$$_ITKIOImageBasePython.so + 252
frame #3: 0x00000003deba7ff4 _ITKIOImageBasePython.so`___lldb_unnamed_symbol7056$$_ITKIOImageBasePython.so + 132
ITK๊ฐ ์๋ ๋์ฒด VXL/VNL์ ์ฌ์ฉํ์ฌ ITK๋ฅผ ๊ตฌ์ถํ๋ค๋ ์ ์ ๊ธฐ์ตํ์ญ์์ค. libvnl_algo.dylib
๋ ์ฐ๋ฆฌ ๊ฒ์ด๊ณ _ITKIOImageBasePython.so
๋ conda์์ ๊ฐ์ ธ์จ ๊ฒ์
๋๋ค.
์ฐ๋ฆฌ๋ ๋ค๋ฅธ ๋ฒ์ ์ ํผํฉํ๊ณ ์์ผ๋ฏ๋ก ์ถฉ๋์ด ๋ฐ์ํ๋ ๊ฒ์ ๋๋ผ์ด ์ผ์ด ์๋๋๋ค.
@archanasri ์ ๋ฐฉ๊ธ ํฌํจ ์์๋ฅผ ๋ฐ๊พธ๋ ค๊ณ ์๋ํ์ง๋ง(๋ค์ ํ
์คํธ #1168) ์คํจํฉ๋๋ค.
#1168 ๋ฌธ์ ์ ๋ํ ํด๊ฒฐ์ฑ
์ ๋จ์ํ itkwidgets๋ฅผ ๋น๋ํ๋ ๊ฒ์
๋๋ค(์ง๊ธ ์๋ ์ค์
๋๋ค).
์ด ๋ฌธ์ ๋ฅผ ์ํด, ์ฐ๋ฆฌ๋์ ITK๋ฅผ ๊ฐ๋ฆฌํฌ ์ ์์ต๋๋ค ์ฐ๋ฆฌ์ vnl
์ฐ๋ฆฌ๊ฐ ์ฐ๋ฆฌ๋ฅผ ๊ฐ๋ฆฌ์ฒ๋ผ eigen
?
VXL์ ์ฌ์ฉํ๋ ITK๊ฐ ์ด๋ฏธ ์์ต๋๋ค.
-DITK_USE_SYSTEM_VXL=on -DVXL_DIR=${INSTALL_DIR}
์ ๋ฐ์ดํธ. ์ข์, ๋๋ ํ์ด์ฌ ์ถ๋ ฅ์ ํผ๋์ค๋ฌ์ ๋ค. ๋ ์ด์์ ์ถ๋ ฅ์ด ์์๊ธฐ ๋๋ฌธ์ ๊ทธ๊ฒ์ด ์ฌ์ ํ ์ค์ ๋จ๊ณ์ ์๋ค๊ณ ๊ฐ์ ํ๋ค. FindReferenceImage์์ ์ถฉ๋์ด ๋ฐ์ํฉ๋๋ค.
dim = itk.GetArrayFromImage(itk.imread(inDataList[i])).shape
๋ด ์๊ฐ์ ๋ฌธ์ ๋ ๋ฉ๋ชจ๋ฆฌ์ ๋ก๋๋ ๋ ๊ฐ์ ๋ค๋ฅธ ITK ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋ค๋ ๊ฒ์ ๋๋ค. ๐
python itk๋ฅผ ์ฌ์ฉํ๋ ๋์ shapeworks.Image.toArray()๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๊ทธ๋์ ๋๋ ๊ต์ฒดํ๋ค
dim = itk.GetArrayFromImage(itk.imread(inDataList[i])).shape
~์ ํจ๊ป
img = Image(inDataList[i])
tmp = img.toArray()
dim = tmp.shape
์ง๊ธ์ ์ถฉ๋ํ์ง ์์ต๋๋ค.
์ข์ @archanasri. ๋ค, ๊ทธ๋ ๊ฒ ํ๋ฉด ํด๊ฒฐ๋ ์ ์์ ๊ฑฐ๋ผ ์๊ฐํ์ต๋๋ค. ์ฐ๋ฆฌ๋ ๊ธฐ๋ณธ์ ์ผ๋ก python itk + ์ฐ๋ฆฌ itk๋ฅผ ๋์์ ์ฌ์ฉํ์ง ์๋๋ก ํด์ผ ํฉ๋๋ค. ITK ํ์ด์ฌ ์ธํฐํ์ด์ค๋ฅผ ๋ด๋ถ์ ์ผ๋ก ์ฌ์ฉํ๋ค๊ณ ๊ฐ์ ํ๊ธฐ ๋๋ฌธ์ itkwidgets ๋ฌธ์ ๊ฐ ๋ ํฐ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค.
์, ์ฐ๋ฆฌ๋ itkwidgets๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.
itkwidgets๊ฐ ์ฐ๋ฆฌ์ itk๋ฅผ ์ฌ์ฉํ ๋ฐฉ๋ฒ์ ์ฐพ์์ผ ํฉ๋๋ค.
์, ์ฐ๋ฆฌ๋ itkwidgets๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.
itkwidgets๊ฐ ์ฐ๋ฆฌ์ itk๋ฅผ ์ฌ์ฉํ ๋ฐฉ๋ฒ์ ์ฐพ์์ผ ํฉ๋๋ค.
itkwidgets 0.32.0(์ต์ ํ๊ทธ ๋ฒ์ ) setup.py์์ ๋ค์ ์๊ตฌ ์ฌํญ์ ์ง์ ํฉ๋๋ค.
'install_requires': [
'colorcet>=2.0.0',
'itk-core>=5.1.0.post2',
'itk-filtering>=5.1.0.post2',
'itk-meshtopolydata>=0.6.2',
'ipydatawidgets>=4.0.1',
'ipywidgets>=7.5.1',
'ipympl>=0.4.1',
'matplotlib',
'numpy',
'six',
'zstandard',
],
itk์ ๊ฒฝ์ฐ, ์ด๊ฒ์ด ์ฐ๋ฆฌ๋ฅผ ํ์ด์ฌ ๋น๋๋ก ๋๋๋ ค๋์ ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
์ด์ ์ ๊ทผํ๋ ๋ ๋ค๋ฅธ ๋ฐฉ๋ฒ์ pip(๋๋ถ๋ถ) ๋ฐ conda์ ์ํด ์ค์น๋ ๋ฒ์ ์ธ์ง ํ์ธํ๋ ๊ฒ์
๋๋ค.
๋ด ์์คํ
์ ์๋ ์ด ๋ชจ๋ ๋ฒ์ ์ ๋ชจ๋ ์ต์ ๋ฒ์ ์
๋๋ค.
๋ด๊ฐ ๊ฐ์ง ๊ฒ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
(shapeworks) cam<strong i="15">@ananda</strong>:~/code/ShapeWorks/ShapeWorks/Examples/Python$ conda list | grep itk
itk 5.0.1 pypi_0 pypi
itk-core 5.1.2 pypi_0 pypi
itk-filtering 5.1.2 pypi_0 pypi
itk-io 5.0.1 pypi_0 pypi
itk-meshtopolydata 0.6.3 pypi_0 pypi
itk-numerics 5.1.2 pypi_0 pypi
itk-registration 5.0.1 pypi_0 pypi
itk-segmentation 5.0.1 pypi_0 pypi
itkwidgets 0.32.0 pypi_0 pypi
(shapeworks) cam<strong i="16">@ananda</strong>:~/code/ShapeWorks/ShapeWorks/Examples/Python$ conda list | grep ipy
brotlipy 0.7.0 py37hf967b71_1001 conda-forge
ipycanvas 0.8.2 pypi_0 pypi
ipydatawidgets 4.2.0 pypi_0 pypi
ipyevents 0.8.2 pypi_0 pypi
ipykernel 5.5.0 py37he01cfaa_1 conda-forge
ipympl 0.7.0 pypi_0 pypi
ipython 7.21.0 py37he01cfaa_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipyvtk-simple 0.1.4 pypi_0 pypi
ipywidgets 7.6.3 pypi_0 pypi
ํ๋์ ์ํ ์ ํธ๋ itk-io, -registration, -segmentation, ๊ทธ๋ฆฌ๊ณ ๋ฌด์๋ณด๋ค๋ itk ์์ฒด์ 5.0.1 ๋ฒ์ ์ ๋๋ค.
๋๋ pip ์ค์น๋ฅผ ์ต์ ์ผ๋ก ์ ๋ฐ์ดํธํ๊ณ (์ฐ๋ฆฌ๊ฐ ์ด๊ฒ์ ํ ์ ์๋ ์ด๋ค ์ด์ ๊ฐ ์์์ง๋ง ์ง๊ธ์ ๊ทธ๊ฒ์ ์ ์ณ๋๊ณ ) ๋ชจ๋ ์ข ์์ฑ์ ์ฌ๊ตฌ์ถํ์ต๋๋ค. #1168์ ์ฌ์ ํ โโ๊ฑฐ๊ธฐ์ ์ค๋ช ๋ ๊ฒ๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์ถฉ๋ํฉ๋๋ค.
๊ฒฐ์ ๋.