07-08-2014 05:05 PM
Handling 3D images well in LabVIEW takes a bit of effort - if you're not careful, LabVIEW will make copies of your array and that can lead to out-of-memory issues very quickly,
Based on your screenshot (you're better to attach the code itself) here's a few things to try:
That should get you working for now, even in 32-bit LabVIEW (512x512x512xU16 = 256MB), but do keep careful track of your memory allocation. Use Tools/Profile/Show Buffer Allocations... to show where LabVIEW is allocating memory, and see if you can eliminate as many of those as possible.
07-08-2014 05:26 PM
Thanks a lot I guess there is memory issue with my system.
Here I am attaching code .
07-09-2014 12:34 AM - edited 07-09-2014 12:36 AM
@Klemen wrote:
Hello,
since the subject is not moving, I would suggest choosing a reference image (the first image, or possibly the slice with the greatest area) and draw a line ROI so that it is coplanar with the desired plane. Loop through all the indices of the line ROI and extract the intensity of the image along the line ROI. Write the intensities in a array/image to the first column (or row). Repeat for all slices incrementing the column/row.
Best regards,
K
Hello,
I was thinking about something like this.
You could initialize array before looping instead of building it, if you have a lot of data.
Best regards,
K
07-09-2014 07:03 PM
I really appreiate help from you guys.
Here I am attaching my working code.
07-10-2014 01:27 AM
A 512x512x512 3D array of U16 should only take 256 MB of memory if you do it right. Try this:
Loop through the image file names. For each image, load image and convert to array. Wire the array out of the loop. This will only load one image at a time, so it should be efficient. Wire the 3D array into a while loop, where you extract the desired 2D plane, convert it to an image, and display it. Your main memory usage would be one 3D array and four 512x512 images.
Bruce
07-10-2014 11:20 AM
Thanks a lot . This is really really awsome and very fast .
07-10-2014 11:44 AM
Further thoughts:
For the selector for each image in the while loop, you can use a slider. A very easy way to scan through the images quickly.
If you are using the same set of images repeatedly, you can reduce the load time by saving the 3D array to a binary file, then loading the binary file in a separate vi for viewing.
For smoother transitions between images while moving the slider, you can decrease the loop timer. Just don't remove it or your CPU usage will go to 100%.
Bruce
05-18-2021 05:11 PM
please i would appreciate if you can help, how can i convert an axial image to sagatial in dsi studio?