Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown CMake command "set_and_check". #118

Closed
JinhoKim46 opened this issue Feb 7, 2023 · 5 comments
Closed

Unknown CMake command "set_and_check". #118

JinhoKim46 opened this issue Feb 7, 2023 · 5 comments

Comments

@JinhoKim46
Copy link

JinhoKim46 commented Feb 7, 2023

Error

I got an error, "Unknown CMake command "set_and_check"." on Ubuntu 20.04 LTS on WSL while I installed siemens-to-ismrmrd tool.
To be more specific, I could install "ismrmrd' tool, but I got the error during the following step to install "siemens-to-ismrmrd".


Envornment versions

  • Ubuntu: 20.04 LTS on WSL
  • CMake: 3.16.3
  • apt: 2.0.2 (amd64)

Reproduce the error

  1. Run the new terminal on Ubuntu 20.04 LTS

  2. Followed the installation steps described in https://github.com/ismrmrd/siemens_to_ismrmrd

    1. Install ISMRMRD

      cd ismrmrd
      cd build
      cmake ..
      make
      sudo make install

      I could install ISMRMRD. (I got help from the issue opened in PugiXML was not found || Possible solution exists in a commit ismrmrd#227)

    2. Set the ISMRMRD environmental variable:

      echo "export ISMRMRD_HOME=/usr/local/ismrmrd" >> $HOME/.bash_profile
      source $HOME/.bash_profile

    3. Clone siemens_to_ismrmrd to local

      git clone https://github.com/ismrmrd/siemens_to_ismrmrd.git

    4. Install siemens_to_ismrmrd

      cd siemens_to_ismrmrd
      mkdir build
      cd build
      cmake ..

    Then, I get this error

    CMake Error at /mnt/c/Users/z0048drc/Documents/Github/ISMRMRD_Convertor/ismrmrd/build/ISMRMRDConfig.cmake:55 (set_and_check):
    Unknown CMake command "set_and_check".
    Call Stack (most recent call first):
    CMakeLists.txt:70 (find_package)

Corresponding screenshot:
2023-02-07 22_07_20-Cmder


I have no clue to solve this idea. Can you help me to solve this problem?
Have I missed something in the process?

Thanks

@hansenms
Copy link
Member

hansenms commented Feb 7, 2023

Could you try cmake 3.20. It is what we use when we build.

Also, there is really no need to build it if you install in a conda environment. We ship packages for it.

@JinhoKim46
Copy link
Author

Hello,

Yes, actually, I do use the python package "ismrmrd" for post-processing after I convert Siemens "dat" file to "h5" file using siemens-to-ismrmrd tool.

Can I use the 'ismrmrd' python package to convert the Siemens raw file format, "dat" to to ISMRMRD raw data format? "h5"?
In that case, everything becomes really easier.

The pipeline that I had worked on was

  1. Run the command,

siemens_to_ismrmrd -f input.dat -o output.h5 --skipSyncData True -z -1

  1. Then, now, I get an output.h5 file.
  2. Read the output.h5 file to the python script to post-process, such as removing oversampling, FT along the z direction to make 3D to 2D.

Is it possible to integrate all these processes into one process in the python script using the 'ismrmrd' Python package?
In other words, using the "ismrmrd" python package, can I convert Siemens "dat" file to "h5"file?
If so, please give me some hints about that.

@hansenms
Copy link
Member

hansenms commented Feb 8, 2023

You can install the c/c++ library and the siemens_to_ismrmrd converter with conda. Packages are here: https://anaconda.org/ismrmrd/

@JinhoKim46
Copy link
Author

JinhoKim46 commented Feb 9, 2023

Hi,

I couldn't install the library and siemens_to_ismrmrd converter with conda.

However, I could install it with cmake v3.20.0


For whom may have the same problem as I had, I will add how I installed the converter.
I installed the tool on WSL.

  1. Install WSL
    • wsl --install -d Ubuntu

  2. If there is a network problem, then refer this git issue.
  3. sudo apt update

  4. sudo apt upgrade

  5. Install cmake version=3.20.0
    • Follow the link. Look at a session "Install CMake through the Ubuntu Command Line"
  6. Install all required dependencies. In my case, I integrated all dependencies from ismrmrd repo and siemens-to-ismrmrd. There might be some duplicated or unnecessary dependencies, but it was fine for my case.
    • sudo apt-get install libboost-all-dev xsdcxx libxerces-c-dev libhdf5-serial-dev h5utils hdf5-tools libtinyxml-dev libxml2-dev libxslt1-dev libfftw3-dev libxml2-utils libpugixml-dev libfftw3-dev doxygen git-core graphviz

Special thanks to @hansenms for supporting me in solving this problem.

I hope this helps someone to solve the same problem I had.

@hansenms
Copy link
Member

hansenms commented Feb 9, 2023

Cool, I will close this.

@hansenms hansenms closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants