def compute(self):
        ramp = self.interpreter.filePool.create_file(suffix='.txt')
        tf_vals = self.interpreter.filePool.create_file(suffix='.txt')
        output = self.interpreter.filePool.create_file(suffix='.nrrd')
        steps = self.get_input('steps')
        rng = self.get_input('range')
        self.run_teem('echo "0 1"',
                      '| unu reshape -s 1 2',
                      '| unu resample -s = %d -k tent -c node' % steps,
                      '| unu save -f text -o %s' % ramp.name)
        tf_file = file(tf_vals.name, 'w')
        tf = self.get_input('transfer_function')
        for (scalar, op, (r, g, b)) in tf._pts:
            tf_file.write('%f %f %f %f %f\n' % (scalar, r, g, b, op))
#             tf_file.write('%f %f\n' % (scalar, op))
        tf_file.close()
        self.run_teem('cat %s' % tf_vals.name,
                      '| unu reshape -s 5 %d' % len(tf._pts),
                      '| unu imap -i %s -r -m -' % ramp.name,
                      '| unu reshape -s 4 %d' % steps,
                      '| unu axinfo -a 0 -l "RGBA"',
                      '| unu axinfo -a 1 -l "gage(scalar:v)" -mm %f %f -o %s' % (rng[0],
                                                                                 rng[1],
                                                                                 output.name))
        self.set_output('nrrd', output)

##############################################################################
dataset/ETHPy150Open VisTrails/VisTrails/contrib/edu_utah_sci_cscheid_teem/__init__.py/TeemScaledTransferFunction.compute/original