This is a bit unclear. Is this header the result of Export, or did you
write it?
I'm trying to figure out first why the offset to the invalids is 75089. I
get 38x76x2(vector)x4(float) bytes = 23104 (positions block). I would then
expect the next array to follow on the next byte, not 50000 some later. If
you deleted the data, did you also delete the data stanza in the field
definition below?
If you Replaced data to invalid positions, are you sure the data was all
byte(0) or byte(1), the only permitted values for invalids? (That's why I
ask if you wrote this file: you could declare that object 3 is unsigned
byte, but if it isn't, you have a problem).
Let's start over: let's say you have arbitrary data, like scalar floats in
the range 1.0-100.0. You want to invalidate some of the positions based on
the data. Let's say you don't like values 1.0-10.0. Run the field into:
Compute(a<=10.0 ? byte(1) : byte(0))
Take the output of the Compute (a field whose "data" is now all byte 1 or
0) into Replace "source" and the original field (prior to Compute) into
Replace "destination", then set source component "data" and destination
component "invalid positions". You're done. You have a one to one
correspondence of invalids to positions, and data to positions. Your
original data is still in the "data" component, inherited via the
destination field. The invalid positions component has been added to the
result field (a very useful use for Replace: it also can do Insert). Does
that help?
Do you know how to use Print("rd") to inspect the structure and an
abbreviated contents of a field? It's very useful when debugging things
like this, cause you can move the Print down through the net one module at
a time and see what changes are wrought.
Cheers,
>Hello,
>I have a data set whose DX description is (data deleted)
>
>object 1 class gridconnections counts 38 76
>attribute "element type" string "quads"
>attribute "ref" string "positions"
>attribute "dep" string "connections"
>#
>object 2 class array type float rank 1 shape 2 items 2888 data 0
>attribute "dep" string "positions"
>#
>object 3 class array type unsigned byte rank 0 items 2888 data 75089
>attribute "dep" string "positions"
>#
>object "default" class field
>component "connections" value 1
>component "positions" value 2
>component "invalid positions" value 3
>attribute "series position" number 24.000000
>#
>end
>
>Now when I pass this into a Band module it gives an error message of
>
> Band : Invalid data : dependent invalid data component must be scalar
>bytes.
>
>I created the invalid positions component using Replace("data","invalid
>positions")
>and then a Replace("data","data") to put the original data back in. So why
>does
>Band give me this message and how do I fix it.
>
>Cheers,
>Simon.
>
>// Simon Spagnol, [EMAIL PROTECTED]
>// Australian Institute of Marine Science
>// PMB No 3, Townsville QLD 4810, Australia
>// ph: +61-7-47534444, fax: +61-7-47725852
Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]
(607) 257-8335 or (607) 254-8794