How to install an earlier release of ITK

Hello,

I am trying to use a tool called PETPVC which requires the insight toolkit. I built and installed ITK version 5.1 on MacOSX15, however, I am unable to build PETPVC in Cmake because of a missing CylinderSpatialObject:

fatal error: ‘itkCylinderSpatialObject.h’ file not found
#include “itkCylinderSpatialObject.h”

I have read that the only fix is to use version 4.13.3, as it still contains the missing object. How do I uninstall ITK 5.1 and replace it with ITK 4.13.3?

Thank you for your help.
Aaron

Delete the directory where you have built the ITK, as well as any “installed” ITK files. Then download and build ITK 4.13.3.

Thank you for your reply. I have deleted all files associated with version 5.1. When trying to configure the ITK 4.13.3 build using Cmake 3.20.0, it fails with the following errors:

CMake Deprecation Warning at Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt:84 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a … suffix to tell
CMake that the project does not need compatibility with older versions.

I have gone into CMakeLists.txt that is in the first directory of the source code and updated the version argument as it suggested but continue to get similar errors. As a result, I cannot build or install ITK 4.13.3 like I did with version 5.1. Any suggestions?

Thank you very mcuh

This is a warning, ignore it. Do not modify the sources. After configuring once or twice, you will be able to click “Generate”. Then you will be able to build it via ninja or make.