added a minor change to the string expression and the for loop.

This commit is contained in:
Mahesh Balasubramaniam 2013-01-04 12:01:34 +00:00
parent 7157e8f03c
commit 3242361c91
1 changed files with 2 additions and 4 deletions

View File

@ -11,8 +11,8 @@ def write_gsmh(RGB_vector,name):
def write_paraview(RGB_vector,name):
colormap = open(str(name) + '.xml',"w")
colormap.write('<ColorMap name = "'+ str(name)+ '" space = "RGB">\n')
for i in range(len(RGB_vector)):
colormap.write('<ColorMap name="'+ str(name)+ '" space="RGB">\n')
for i in range(len(RGB_vector[0])):
colormap.write('<Point x="'+str(i)+'" o="1" r="'+str(RGB_vector[0][i])+'" g="'+str(RGB_vector[1][i])+'" b="'+str(RGB_vector[2][i])+'"/>\n')
colormap.write('</ColorMap>')
file.close(colormap)
@ -32,5 +32,3 @@ def write_raw(RGB_vector,name):
colormap.write(str(RGB_vector[0][i])+'\t'+str(RGB_vector[1][i])+'\t'+str(RGB_vector[2][i])+'\n')
file.close(colormap)
def read_raw(filename):
print 'void'