The reason it is not working is that colors are three-dimensional (rgb) and rubbersheet requires a scalar value. Yes I know that Print is telling you it's scalar, however what you've likely got is a "lookup table" set of colors (that is, what's in the color component is simply an index into a colormap, so the colors really are 3D after all, which of course they must be).
You need to decide what you want your rubbersheet to look like. Do you want to do it based on the red? the green? the blue? The brightness? Then use Compute, for example, to modify your "colors" component so that the result really is a scalar value.

If you convert to grayscale for example, and then do "mag(a)" in compute, then the white areas will end up high and the black areas low. Perhaps that is what you want...
Donna


Donna L. Gresh, Ph.D.
Optimization and Mathematical Software Group
IBM T.J. Watson Research Center
(914) 945-2472
http://www.research.ibm.com/people/g/donnagresh
[EMAIL PROTECTED]



Wolfgang Braun <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

06/11/2003 10:10 AM
Please respond to opendx-users

       
        To:        [email protected]
        cc:        
        Subject:        Re: [opendx-users] bitmap to rubbersheet



>> What do I need to do to visualize an image imported e.g. as greyscale TIFF
>> as
>> a rubbersheet landscape? I did not find an appropriate example and
>> import-->rubbersheet does not work.

> Try ReadImage->Mark(,"colors")->RubberSheet

Trying the above sequence, rubbersheet complains
ERROR: RubberSheet: Invalid data: invalid data: scalar or 1-vector real data
required
Feeding the output of mark (colors) to inquire --> print yields
Generic array. 1 item, integer, real,scalar
In a different network where I use import from dx format instead of
ReadImage, an inquire --> print of the input to rubbersheet also gives
Generic array. 1 item, integer, real,scalar
In that case, the network works without problems.
I have tried to flatten the image and convert it to grayscale before
importing it, to no avail.
converting to rgb before importing using ImageMagick makes ReadImage complain
about missing size, if manually specified, rubbersheet issues the same error
as above.
converting to miff before importing (again with convert) makes ReadImage
complain about class=PseudoClass not being supported.
I have my data only as a bitmap to start from.
What could be wrong with the image import?
--
Dr. Wolfgang Braun
Paul-Drude Institute
for Solid State Electronics
Hausvogteiplatz 5-7
D-10117 Berlin

office: +49-(0)30-20377-366
bessy: +49-(0)30-6392-4879
mobile: +49-(0)170-2635-118
fax  : +49-(0)30-20377-201



Reply via email to