[MINC-users] Reading time-width data with minc2 API

EJ Nikelski nikelski at bic.mni.mcgill.ca
Fri Aug 7 19:02:57 EDT 2009


Hi List (yet again),

   I have a 4-d volume (time, zspace, yspace, xspace) and I need to
read the time-related information, specifically the offset and width
info.  Looking at the volume itself, I can see 34 values each for the
"time" and "time-width" variables.

"miget_dimension_offsets" (minc2 API) had no trouble pulling in the 34
"time" values, however, I'm stumped on how to read in the 34
"time-width" values.  I tried "miget_dimension_widths" and got zeros.
Am I using the correct API call?  Here's what I'm doing ...

-----------------------------------------------------------
midimhandle_t		*dimensions;
double			time_widths[34];

result = miget_dimension_widths(dimensions[0], MI_ORDER_FILE, 34, 0,
time_widths);
if ( result == MI_ERROR ) { error("Error returned from
miget_dimension_widths.\n"); }
-----------------------------------------------------------

   Forgive the hard-coding of 34 ... I'm testing.  My immediately
preceding call to "miget_dimension_offsets" (also using dimensions[0])
worked just fine.  Any idea what's going on here?

Thanks,

-Jim

-- 
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University


More information about the MINC-users mailing list