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

error in using wb_command inside matlab #36

Open
amirka1379 opened this issue Sep 30, 2021 · 6 comments
Open

error in using wb_command inside matlab #36

amirka1379 opened this issue Sep 30, 2021 · 6 comments

Comments

@amirka1379
Copy link

I want to do a palm analysis with -transposedata and etc
but it keeps giving me 'Currently cannot read/write CIFTI files without the HCP Workbench'
I tried some of the ways you have mentioned to how to fix this problem but it did not help
I would appreciate it if you helped me how to use the hcp workbench inside Matlab
and how to work with the wb_command function
wb_view function is alright in Matlab
but my windows Matlab can not recognize wb_command with the system('wb_command')

@amirka1379 amirka1379 changed the title error in using wb_vommand inside matlab error in using wb_command inside matlab Sep 30, 2021
@andersonwinkler
Copy link
Owner

Hi Amirhosein,

PALM uses the command "which" to locate programs such as wb_command, but this only works on Linux and Mac.

For Windows you'd have to edit the palm_checkprogs.m to make PALM set "palm_extern.wb_command = true" always, and further, edit palm_ciftiread.m and palm_ciftiwrite.m such that the variable "wb_command" is set at the beginning to point to the location in your system where the actual wb_command is located.

It should work then, but you'll have to make these edits by hand.

All the best,

Anderson

@amirka1379
Copy link
Author

thanks a lot for your help i did succeed in running the command but I get this error after the first problem was solved
ERROR: NAME OF FILE: results_Y4h4Ng.gii

Output stream for external file reports its status as bad.

Error using xml_parser
The XML document was not valid

and when I do
gii = gifti('results_Y4h4Ng.gii');

this error will pop up
Error using xml_parser
The XML document was not valid

Error in gifti_read (line 14)
t = xml_parser(filename);

Error in gifti (line 105)
this = gifti_read(varargin{1},giftistruct);

@gllmflndn
Copy link
Contributor

Hello @amirka1379
Assuming the file is where it should be when read by the gifti library, could you attach file results_Y4h4Ng.gii to this issue so that I can have a look?

@amirka1379
Copy link
Author

results_Y4h4Ng.gii.zip
Thanks for your precious help this is the zipped file of it

@gllmflndn
Copy link
Contributor

Thank you, the XML file is indeed not valid, two end tags are missing at the end of the file:

</DataArray>
</GIFTI>

After adding them manually, the file is parsed correctly so it might be worth checking whether there is an issue upstream with wb_command: are you using the latest version?
The data are stored in results_Y4h4Ng.gii.data: there might be further issues in reading the data but it would be good to clear the issue above first.

@gllmflndn
Copy link
Contributor

I also notice the Data tag is missing so what actually needs to be added at the end of the file is:

  <Data/>
  </DataArray>
</GIFTI>

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

3 participants