int
mask_volume(header *hdr, void** data, char *mask) {
The new volume is smaller and consists of the volume data points sampled where the mask volume is non-zero.
The header is changed into a 1-dimensional vector with the correct n.o. elements.
Fill in required size and data type into a header struct (obtained from new_header(). Allocate data using
read_volume( "myvolume", hdr1, &data ); // A big volume read_volume( "mymask", hdr2, &mask ); // A binary mask mask_volume(hdr1, &data, mask); // Now the volume is smaller..
1.0 20/7-98 Ulrik Kjems