Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change an Image name?

Not sure if this belongs here or in LabVIEW.
I'm trying to display a stack of DICOM MRI images. No problems there apart from a minor problem of renaming the image with the filename,which I could then use as the display window title. It helps me keep track of which image I'm looking at. There are workarounds, but I was surprised that there was no write equivalent vi to the IMAQ GetImageInfo. It was there in previous versions of LabVIEW (I'm currently using 7.1). Am I missing something about how IMAQ works, or does it make sense to have a way of changing the image name?
Also, is there a defeinition of data types available somewhere? I couldn't find anything to define the image datatype.
Thanks
John
0 Kudos
Message 1 of 3
(3,674 Views)

The only way I can think of is to create a new image with the name you want, then copy the old image to that image.  Another possibility is to create the image using the filename right before you load the image.  I haven't ever tried to do this, though, so there may be an easier way.  I can see this creating lots of images in memory if you keep loading different images.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 3
(3,669 Views)
Thanks, Bruce. I even checked the IMAQ Copy reference and rejected that option because the description led me to believe that it copied ALL of the source image information. However, you encouraged me to try it and your suggestion works.
Maybe NI needs to change a misleading description of IMAQ copy to clarify its operation. I quote from the IMAQ Copy description: "If the source image contains additional information, such as..... the additional information is also copied to the destination image." Apparently, the image name isn't considered to be additional information. Admittedly, it isn't included in the 'such as' list, but it still seems misleading.
Not sure why there isn't a function to change the image name. It was there in 6.?? or maybe 5.?? because I have a vestigial vi for changing the image name in my original program - circa 2001. I had to take out the function when I upgraded LabVIEW.
You are right about the image management issue. I'm loading over 100 images representing different velocity vectors in short (~20-frame) cine sequences of MRI images. I use them to track 3-d tissue movement so I really need them all in memory at the same time.
Thanks again for that helpful suggestion
0 Kudos
Message 3 of 3
(3,662 Views)