WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   <multimedia:image>.setImageData question (

shivanangel 01-28-2014 07:43 PM

<multimedia:image>.setImageData question
Hello Vizard Support,

I had a question when using .setImageData().
I'm working on an updated volume renderer and I'm trying to populate a 3D texture ( btw, thank you for helping me with that months ago ) but instead of using the .load() method with a file name I wish to fill the 3D texture with images that have already been loaded into Vizard.

Specifically, I'm trying to do something like this:


def loadBlank3DTexture( blank3DTex, imageList ):
        Fill 3D texture with provided list of images in sequential order
        for i, image in enumerate( imageList ):
                imageSize = image.getSize()
                print i, image
                blank3DTex.setImageData( image.getImageData(), imageSize, blank3DTex.getPixelFormat(), i )

I originally was testing with 3 png images that were only all red, green, or blue each. I noticed only the blue images seemed to load.

Then I tested with images with differing RGB values to see if a specific channel was being shown and I noticed only the blue channel was being displayed. Obviously, there is something I am not understanding about the setImageData method. I seem to only be passing the blue channel.

Any thoughts?


All times are GMT -7. The time now is 05:57 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC