04-17-2009 08:12 AM
Post a new message to that thread to see if you can get a response from Mike since your curent line of inquiry is related to that code and not MRI related (we can't watch every thread anymore ).
Ben
04-17-2009 11:27 AM - edited 04-17-2009 11:28 AM
I was able to extract the individual frames - is it possible to convert them to a 3D array without IMAQ?
04-17-2009 11:32 AM
gastro54 wrote:I was able to extract the individual frames - is it possible to convert them to a 3D array without IMAQ?
Message Edited by gastro54 on 04-17-2009 11:28 AM
Yes, but I can't help yo now since I don't have anyhting that will handle a .rar file and my boss would fron on it.
Post an image showing where you are having trouble and lets see if we can get you to the next step.
Ben
04-17-2009 11:51 AM
Simply extract the RAR file into a folder containing the individual JPGs, then read them in a loop as 2D arrays, building a 3D array at the autoindexing output tunnel. 😉
You have all the tools in the plain "graphucs&sound...graphics formats" palette. ("read jpg" followed by "unflatten pixmap").
See how far you get, else I can look at it in a few hours. 😉
04-17-2009 11:58 AM - edited 04-17-2009 12:03 PM
OK - here is what I have so far
EDIT: I almost got it I'll post an update when
04-17-2009 12:12 PM - edited 04-17-2009 12:14 PM
OK almost there, having some issues padding the file name with the correct number of zeros (0001, 0002, 0003, ... 0139, 0140).jpg
04-17-2009 12:21 PM
gastro54 wrote:OK almost there, having some issues padding the file name with the correct number of zeros (0001, 0002, 0003, ... 0139, 0140).jpg
Message Edited by gastro54 on 04-17-2009 12:13 PMMessage Edited by gastro54 on 04-17-2009 12:14 PM
Good!
Now take a couple of minutes and try plotting just one of those slices to an intesity graph to make sure you can see the image. Depending.... every third byte MAYBE all you need if the image was saved as black/White. Also watch for padding of the pixmap data to an even number of bytes (compare byte count with image size).
If all is Ok you should be able to wire it up to that example I posted for the mouse tendon and then sit back and wait (140 slices will take a while).
Ben
04-17-2009 12:22 PM - edited 04-17-2009 12:32 PM
I think I got it! Heres the final conversion code
EDIT: Hmmm for some reason the array looks empty? I used the probe while it was running and it looked like the image was being read correctly..
04-17-2009 12:45 PM
OK - Fixed it, it needs to be 24bit, not 8bit
Still trying to find ideal intensity scale
04-17-2009 01:30 PM
Having some weird rendering issues.
While Dragging to change perspective:
After release: