LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Storage and Access

I am working with some 2D arrays that are slices of an overall 3D image. My VI continuously inputs the 2D arrays until it has finished the entire 3D image. This all occurs on one wire, so as a 2D image comes in, data gets overwritten. My question is what would be the most efficient way to store and access these 2D arrays in a format where I can modify and extract certain elements (1D arrays, 2D arrays, etc.)? I have tried queues, DVRs, shift registers, and some other methods, but I can't seem to pinpoint which one works most efficiently. Any guidance would be appreciated. Thanks!

0 Kudos
Message 1 of 6
(2,196 Views)

By the way, the data I am working with is very large. That is why I am asking about the most efficient way to do this. Also, would converting my acquired data (double) to single precision float be advisable to provide measurably reduced processing time?

0 Kudos
Message 2 of 6
(2,190 Views)

First in regards to your second question converting from double to a single will not make a measurable difference in proccessing time. Secondly an efficient way to work with data sets like this can be to use what is called an In Place Element Structure. I have attached a link that gives some information and an example of this structure type.

 

http://www.ni.com/white-paper/6211/en/

0 Kudos
Message 3 of 6
(2,141 Views)

Hey johndoe998,

 

I think that c-radAE's solution will help. I also think that a 3D arrary might also be helpful in your case in order organize these 2D Slices. I'd point you to this form post because the post deals with building the 3D array and then updating that same 3D array. It also deals with memory mangament and trying to make things effiencent too so between those two points I think that you would find something that may help you.

 

http://forums.ni.com/t5/LabVIEW/Dynamically-Build-Update-3D-Array/m-p/2124036#M689266

 

 

JY
Application Engineer, RF and Communications
National Instruments
0 Kudos
Message 4 of 6
(2,093 Views)

This VI is finding the maximum values of a preset 2D array and then inputing those values into a 2D array of dimensions determined by the user. Would reshaping a 2D array be as efficient as preallocating an array and then filling it in? I have tried inputing the max values into a preallocated 2D array, but it only seems to fill in the last column. 

 

Also, Is this the proper usage for an in place element structure? Or should it go inside the for loop that is finding the max of each 1D array? 

 

0 Kudos
Message 5 of 6
(2,063 Views)

Hello johndoe998,

 

I just wanted to ask more information about what you are trying to do, so with it I can make some recommendations.

 

I  see you have an array max & min inside a for loop. What is the functionality you want to achieve? What I understand is that you want to build an array of depth x width dimensions that is going to be filled with the highest elements of the preset 2D array. Is this correct?


Regards,
Daniel M.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 6 of 6
(2,007 Views)