LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find the maximum value in a 3d array in all three Cartesian planes

Solved!
Go to solution
Highlighted

yes i know the code is not super optimised the light does not have the be in the for loop , the for loops can be simplified i was just translating my matlab code into labview and was debugging things along the way.  you can find attached the subVI's and a data set to read.

 

The data sets are ussually a bit big so i uploaded a small set.

Download All
0 Kudos
Message 11 of 18
(183 Views)
Highlighted

when running the VI you should see the following as shown in the picture.

0 Kudos
Message 12 of 18
(181 Views)
Highlighted

You said "find the maximum in this plane". It seems you want to actually show the projection of the data into each plane, i.e. get the sum of all planes in each direction, display it, and show the maximum. My code just shows the max in each direction.

 

Still, you really need to learn about array operations and polymorphism. For example your subVI that scales the data is just pure Rube Goldberg. (and there is no reason to maximize a front panel containing two small indicators to the full screen!). Taking a subset of the original size starting at zero is a noop and operating on each array element with the same value does not need matching arrays!!!

 

 

altenbach_0-1593296013190.png

 

You also need to set the browse option of the path control to "existing folder".


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 13 of 18
(167 Views)
Highlighted

@zak9001 wrote:

I am working with a 3D ultrasound volume data set like the one shown in the attachment. I would like to project the maximum value or in other words the maximum intensity projection of the top , front and side views, In the XY plane , i project the maximum from Z in depth . In the front YZ plane i project the maximum in the X depth and finally in the side plane XZ i project the maximum in the Y depth. 


OK could you clarify. so if you look at all xy planes, you can create an image of the same size as one plane, where each pixel either contains the maximum value for each z column at a give xy or the sum of all values in each column. Typically in a "projection" all voxels contribute, not just the max.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 14 of 18
(158 Views)
Highlighted

Attached is an example of the 2d maximum intensity projections performed in matlab and also a 3D projection.

 

I have a 3D array and i wish to project the maximum values in each 3D direction . TOP is the XY plane with the maximum in Z projected in a 2D image . Front is the YZ plane with the maximum in X projected in a 2D image and Side is the XZ plane with the maximum in Y projected in a 2D image. 

 

Since the size of X ,Y and Z are different the size of the each 2D plane projection will be different 

 

Y has 34 elements

X has 2000 elements

Z has 700 elements

 

hence

the XY 2D plane will be 2000x34 elements with the maximum in Z projected

the YZ 2D plane will be 34x700 elements with the maximum in X projected

the XZ 2D plance will be 2000x700 elements with the maximum in Y projected

0 Kudos
Message 15 of 18
(151 Views)
Highlighted
Solution
Accepted by topic author zak9001

See if this can give you some ideas.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 16 of 18
(145 Views)
Highlighted

Thanks thats exactly what i needed! also thanks for tidying up some stuff!

0 Kudos
Message 17 of 18
(126 Views)
Highlighted

@zak9001 wrote:

... also thanks for tidying up some stuff!


Sorry, I just scraped the tip if the iceberg. The code could probably be reduced to <50% with a bit more effort. 😉


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 18 of 18
(67 Views)