ITK は,次の機能を持ったソフトウェア.
Insight Toolkit (ITK) の 公式ページ: https://itk.org/
Insight Toolkit (ITK) の GitHub のページ: https://github.com/InsightSoftwareConsortium/ITK
Windows での Visual Studio Community 2022 のインストール: 別ページ »で説明
Visual Studio Community 2022 に, Build Tools for Visual Studio 2022の機能が含まれている.
Windows での Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明
【関連する外部ページ】
【サイト内の関連ページ】
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
【サイト内の関連ページ】
Windows での cmake のインストール: 別ページ »で説明
【関連する外部ページ】
cmake の公式ダウンロードページ: https://cmake.org/download/
Windows での Python 3.10 のインストール,pip と setuptools の更新: 別ページ »で説明
Python の公式ページ: https://www.python.org/
コマンドプロンプトを管理者として実行: 別ページ »で説明
C: cd %HOMEPATH% rmdir /s /q ITK
cd %HOMEPATH% git clone --recursive https://github.com/InsightSoftwareConsortium/ITK
cmake でのオプションについて
cmake のオプションの 「Visual Studio 17 2022」のところは, 使用する Visual Studio のバージョンにあわせること. Visual Studio 2022 のときは,「Visual Studio 17 2022」. Visual Studio 2019 のときは,「Visual Studio 16 2019」
cmake の実行手順例は次の通り
cd %HOMEPATH% cd ITK rmdir /s /q build mkdir build cd build del CMakeCache.txt cmake .. -G "Visual Studio 17 2022" -A x64 -T host=x64 ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX="C:/ITK"
※ 下の通りになるとは限らない.エラーメッセージが出るなど場合は,前で cmake を実行したときの設定を変えてやり直す.
終了までしばらく待つ.
cmake --build . --config RELEASE cmake --build . --config RELEASE --target INSTALL
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "[System.Environment]::SetEnvironmentVariable(\"ITK_ROOT\", \"C:\ITK\", \"Machine\")"
参考資料
C:/InsightApplications-3.14.0/MultiResMIRegistration/ReadMe.pdf
--------- CT_MRI_param.txt の中身----------- xxCT.mhd MRI.mhd 0 1 2 0 0 0 3 4 4 4 4 4 4 2500 2500 2500 1e-4 1e-005 5e-006 320 Registered_MRI.hdr ----------------------------------------------------------
cd C:\ITKapp3\MultiResMIRegistration\Debug MultiResMIRegistration.exe CT_MRI_param.txt
実行結果の例
実行結果の例