Changeset 2509 for TI02-CSML/trunk


Ignore:
Timestamp:
22/05/07 18:18:40 (12 years ago)
Author:
mggr
Message:

inverted order of dimensions for raw files (commit for mhen)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/csmllibs/csmldataiface.py

    r2498 r2509  
    579579      # Read and unpack data into a Numeric array. 
    580580      self.data = Numeric.array(struct.unpack(format_str, self.file.read())) 
    581       self.data.shape = tuple(map(int, kwargs['dimensions'])) 
     581       
     582      # The order of dimensions in Numeric arrays do not correspond with 
     583      # the order of dimensions in traditional image files, so we need to 
     584      # reverse the dimensions before shaping the array. 
     585      dimensions = map(int, kwargs['dimensions']) 
     586      dimensions.reverse() 
     587      self.data.shape = tuple(dimensions) 
    582588       
    583589      # If numericTransform or fillValue were provided, store them as  
Note: See TracChangeset for help on using the changeset viewer.