I am trying to use 'envi_stats_doit' to calculate statistics of some ROIs. However, I would like to compute the statistics for the pixels not included in a mask image. I am trying to use the mask with envi_stats_doit function (with m_fid and m_pos) to get it. I use the following command:
roi_dims=[envi_get_roi_dims_ptr(roi_ids[j]),0,0,0,0]
envi_doit, 'envi_stats_doit', fid=fid, pos=pos, $
dims=roi_dims, comp_flag=4, mean=c_mean, $
stdv=c_stdv, cov=c_cov,m_fid=mfid,m_pos=mpos
I get stats out, but the mask was not applied. The 0s should be masked but they are not.
Any suggestion would certainly be appreciated.
|