Well, actually the number of inputs is not fixed.  There are quite a few
modules that have varying numbers of inputs - Collect, for one.  And Rotate
- in which you can continue to add (axis, rotation) input pairs.  Drop down
a Rotate module, select it, and hit control-A.  You'll see two additional
inputs pop up.

Actually, I wonder why you are doing that sort of windowing in your
importer.  Wouldn't it be easier to just import the whole ball of wax, then
use standard OpenDX tools (such as Include, in your example) to do the
selection?  That way you could vary the window without re-importing the
data file.  Or is there a tremendous amount of data?

Greg


                                                                                
                                                      
                      Ireneusz Szczesniak                                       
                                                      
                      <[EMAIL PROTECTED]        To:       
[email protected]                                   
                      do.edu>                            cc:       [EMAIL 
PROTECTED]                                    
                      Sent by:                           Subject:  Re: 
[opendx-dev] "object list" type for a module argument?         
                      [EMAIL PROTECTED]                                         
                                            
                      son.ibm.com                                               
                                                      
                                                                                
                                                      
                                                                                
                                                      
                      09/03/2002 05:07 PM                                       
                                                      
                      Please respond to                                         
                                                      
                      opendx-dev                                                
                                                      
                                                                                
                                                      
                                                                                
                                                      




I am afraid the values of the array cannot be passed as separate
inputs.  The number of entries in the array is variable: it might be
only one, it might be also seven, while the number of module's inputs
is constant.

The ideal solution would be the "object list" type.  In effect, the
module would get an array as one of its inputs.  This array would be
the same as the one with module's inputs.  Then I would check is some
entry is NULL, if not, I would try to extract a float.

The module I am currently working on is to import particles.  Each
particle has coordinates and velocity components.  At the time of
importing the data you might require that the particles meet some
criteria.  For example, you have the particles in 2-D, and require
that the coordinate in the second dimension is greater than 100, but
the coordinate in the first dimension might be of any value.  So you
pass {NULL, 100} as one of the inputs to the module.

The number of dimensions depends on the data, so the number of entries
in the array cannot be fixed.


Ireneusz

On Tue, 3 Sep 2002, Gregory D Abram wrote:

>
> Could these be separate inputs?  Within your module, the inputs come in
as
> an array of objects, with each slot on the array corresponding to an
input.
> When an input isn't given - that is, there's no connection to the input
tab
> on the module in the visual programming environment and you haven't
> specified one in the configuration dialog box, the corresponding slot in
> the module's input array is NULL.  Generally, the module then applies a
> default value for the input.  It seems like thats what you are trying to
do
> - allow the user to not specify an input so that the default will take
> effect.
>
> Greg
>
>
>
>                       Ireneusz Szczesniak
>                       <[EMAIL PROTECTED]        To:
[email protected]
>                       do.edu>                            cc:
[EMAIL PROTECTED]
>                       Sent by:                           Subject:
[opendx-dev] "object list" type for a module argument?
>                       [EMAIL PROTECTED]
>                       son.ibm.com
>
>
>                       09/03/2002 03:53 PM
>                       Please respond to
>                       opendx-dev
>
>
>
>
>
> Hello,
>
> I am Ireneusz Szczesniak, a software developer.  I am writing a module
> for OpenDX.  The module requires an array of floating point numbers as
> one of its inputs.  The trick is that the user does not have to give
> the values for all the entries.  For example, the user might want to
> give {NULL, 3.14, NULL, 1.2e-10} meaning that there is no value for
> the first and third entries.
>
> Choosing "scalar list" as the type for such an input is not right
> because we will not be able to pass the NULL values in the
> Configuration window of the module.  I tried "object list", and hoped
> this would solve the issue.  Unfortunately OpenDX complains about this
> type.
>
> Is there a way of solving the problem?
>
> In the module at the moment the type of the array is "string list", and
> the argument looks like this: {"", "3.14", "", "1.2e-10"}.
>
> Thank you for advice and help.
>
>
>
> Regards,
> Ireneusz Szczesniak
>
> Software Developer
> Center for Integrated Plasma Studies
> University of Colorado at Boulder
>
>
>
>
>
>





Reply via email to