Not signed in (Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorarmin
    • CommentTimeJul 4th 2010
     
    1.) What is the correct vb.net syntax to fill a ILArray with a single array, something like that:

    Dim values (239,319) as Single
    set values = ...
    Dim newILArray as ILArray(Of Single) =new ILArray(of Single)(values,239,319) <== dosen't work???

    2.) What is the correct vb.net syntax to export ILArray values in a single array, something like that:

    Dim values (239,319) as Single
    Dim newILArray As ILArray(Of Single) = ILMath.tosingle(ILMath.zeros(239, 319))
    newILArray.ExportValues(values) <== Dosen't work

    Many thanks for your help in advance
    • CommentAuthorhaymo
    • CommentTimeJul 5th 2010
     

    you may use 1 dimensional arrays for im-/ export into ILArray. If you MUST use multidimensional System.Arrays - for 1) you can create ILArray by implicitly casting (Strict Off, or CType()):
    Dim newILArray as ILArray(Of Single) = values;

    In case of export, there is only the chance to export the elements into a 1 dimensional System.Array or to iterate the elements column by column.

    • CommentAuthorarmin
    • CommentTimeJul 5th 2010
     
    Thank you for your quick response. Yes I need 2 and 3-dimensions-arrays.

    1.) I've resoled in such a way:

    Dim temparray As System.Array
    temparray = CType(Array.CreateInstance(GetType(Single), SizeY, SizeX), Single(,))
    newILArray =temparray

    2.) Thats pity! But I would be a nice function, maybe in future.