3 Replies Latest reply on Dec 2, 2008 12:25 PM by BrianRonan

    graph global variables?

    richhelvey
      Is it possible to pass variables from one kernal in a graph to another?

      -Rich
        • 1. Re: graph global variables?
          BrianRonan
          Hi Rich,

          I'm not sure I understand the question entirely. Are you trying to pass the same parameter to multiple kernels? If so, then yes, that can be done.

          If you want to pass an edited parameter from one kernel to another, that's not possible. You can, however, get around this by moving your logic from the kernel's evaluateDependents to the graph's evaluateParameters.

          I hope this helps.

          Thanks,
          Brian
          • 2. Re: graph global variables?
            richhelvey Level 1
            Not parameters, per se, but if I have one kernal that's done a bunch of hairy computations, I'd like to be able to pass those results down the line so I don't need to redo them. Or if I have one kernal go through the image and find the brightest and darkest pixels, I'd like to pass those values on for processing later. Or things like that.

            -Rich
            • 3. Re: graph global variables?
              BrianRonan Level 1
              Hi Rich,

              Thanks for the clarification! The only output of a Pixel Bender filter is image data, so what you describe isn't directly supported. If you were able to structure the results as image data and pass that into the next stage, you might be able to achieve what you are trying to achieve.

              For instance, if you have a hairy face detection algorithm, you can output an image that has the grayscale representation of the likelihood of where the face is instead of a list of the points where a face might be.

              The brightest/darkest pixels would be tough to do since you can't pass information from one pixel to another in the language.

              Thanks,
              Brian