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

minc_modify_header can't modify variable values #163

Open
moreje opened this issue Apr 20, 2023 · 3 comments
Open

minc_modify_header can't modify variable values #163

moreje opened this issue Apr 20, 2023 · 3 comments

Comments

@moreje
Copy link

moreje commented Apr 20, 2023

Hi,
if I can modify the values of an attribute for a given variable, I did not found how to define new values for the variable itself
for example, in a 4D PET volume:
the variable time cannot be modified, whereas lenght, step,etc... attributes can be modified
is it a bug?

@vfonov
Copy link
Member

vfonov commented Apr 20, 2023

it's because time and step are not attributes in the minc world, they are considered to be variables.
So, it's possible to modify them using mincedit or with library (i.e inside python script).

@moreje
Copy link
Author

moreje commented Mar 15, 2024

ok, do you see any possibility to include this into a bash script ?
I can execute: mincedit xxxx.mnc nano
but I can't find how to modify the header in my script from that :(

@gdevenyi
Copy link
Contributor

If you examine the contents of mincedit, you will see it dumps the mincheader, opens it in an editor, then re-generates a a new empty file with mincgen, followed by minccopy to re-populate the data. Should you need to do such an automated modification, you could code up the same thing, with a sed/awk to programmatically edit the header file.

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