~mrol-dev/mrol/trunk

« back to all changes in this revision

Viewing changes to mrol_mapping/occupiedlist.py

  • Committer: Vikas Dhiman
  • Date: 2012-03-12 18:24:32 UTC
  • mfrom: (16.1.11 trunk)
  • Revision ID: wecacuee@gmail.com-20120312182432-all2q2rb80mzbzhj
Merging Julians changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
        return ids[:,:3]
345
345
        
346
346
    def getvoxeldata(self):
347
 
        inds = self.getvoxels()
348
 
        # TODO: is extracing the inds and the content like this guaranteed to be in the correct order?
349
 
        #if self.userdatatype:
350
 
        #    vox_data = np.hstack([inds, np.array([d.data for d in self._voxels.values()])]) 
351
 
        #else:
352
 
        ndvalues = np.array(self._voxels.values())
353
 
        vox_data = np.hstack([inds, ndvalues.reshape(ndvalues.shape[0], 1)])
354
 
        return vox_data
 
347
        '''Returns both voxel indices and assocated data'''
 
348
        return self.getvoxels(), np.array(self._voxels.values())
355
349
 
356
350
    def getpoints(self):
357
351
        return voxelstopoints(self.getvoxels(), self.resolution)