#NEWLINE# def _read_amira( src_file ) : #NEWLINE# #INDENT# '\n    Reads all information contained within standard AmiraMesh data sets.\n    Separate the header information from the image/volume, data.\n\n    Parameters\n    ----------\n    src_file : str\n        The path and file name pointing to the AmiraMesh file to be loaded.\n\n    Returns\n    -------\n    am_header : list of strings\n        This list contains all of the raw information contained in the\n        AmiraMesh file header. Contains all of the raw header information\n    am_data : str\n        A compiled string containing all of the image array data, that was\n        stored in the source AmiraMesh data file. Contains the raw image data\n    ' #NEWLINE# am_header = [ ] #NEWLINE# am_data = [ ] #NEWLINE# with open ( os . path . normpath ( src_file ) , 'r' ) as input_file : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# line = input_file . readline ( ) #NEWLINE# am_header . append ( line ) #NEWLINE# if ( line == '# Data section follows\n' ) : #NEWLINE# #INDENT# input_file . readline ( ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# am_data = input_file . read ( ) #NEWLINE# #UNINDENT# return ( am_header , am_data )