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 delete top-level variables #34

Open
gdevenyi opened this issue Apr 20, 2016 · 4 comments
Open

minc_modify_header can't delete top-level variables #34

gdevenyi opened this issue Apr 20, 2016 · 4 comments
Assignees

Comments

@gdevenyi
Copy link

Not sure if this is a bug or a missing feature:

With a minc header such as:

<CLIP>
zspace = -39.3054472522805 ;

 acquisition = 0 ;

 dicom_0x0008 = 0 ;

 dicom_0x0009 = 0 ;

 dicom_0x0010 = 0 ;

 dicom_0x0018 = 0 ;

 dicom_0x0019 = 0 ;

 dicom_0x0020 = 0 ;

 dicom_0x0021 = 0 ;

 dicom_0x0023 = 0 ;

 dicom_0x0025 = 0 ;

 dicom_0x0027 = 0 ;

 dicom_0x0028 = 0 ;

 dicom_0x0029 = 0 ;

 dicom_0x0040 = 0 ;

 dicom_0x0043 = 0 ;

 dicom_0x0054 = 0 ;

 dicom_groups = 0 ;

 dicominfo = 0 ;

 patient = 0 ;

 study = 0 ;
}

I'd like to be able to delete these top-level dicom variables.

minc_modify_header -delete dicom_0x0018 17.mnc
-delete option requires argument <var>:<attr>
minc_modify_header -delete dicom_0x0018: 17.mnc
<no output, but variable still exists>

Is it possible to do this?

@rdvincent rdvincent self-assigned this Apr 20, 2016
@rdvincent
Copy link
Member

Not sure off the top of my head, but I assume it should work.

@andrewjanke
Copy link
Member

If it's possible, I'm not aware of how. I once spent a large amount of time
trying to get this to happen and in the end gave up, dumped the header to
cdf, parsed it and then back to MINC to ensure things were gone when
anonymising data. See mincanon and mincclean here:

https://github.com/BIC-MNI/minc-widgets/tree/master/mincanon

a

On 21 April 2016 at 07:29, Robert D Vincent notifications@github.com
wrote:

Not sure off the top of my head, but I assume it should work.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#34 (comment)

@rdvincent
Copy link
Member

there's some ability to delete things in HDF5. Possibly not in NetCDF. In neither case would I assume it would make the file smaller, or automatically overwrite the values (e.g. erase sensitive information).

@gdevenyi
Copy link
Author

Well, mincanon and mincclean are exactly what I was trying to put togeather. So I guess my work is done :)

@andrewjanke expect an incoming patche for mincanon which uses a temp directory. I found that high speed read/writes using minc_modify_headers triggers a nasty bug in my NFSv4 systems

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