Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"run Byte Swapper" issue when importing FLIR JPG #9

Closed
coatej opened this issue Sep 5, 2022 · 14 comments
Closed

"run Byte Swapper" issue when importing FLIR JPG #9

coatej opened this issue Sep 5, 2022 · 14 comments

Comments

@coatej
Copy link

coatej commented Sep 5, 2022

image

Hi Glen. Thanks for your work on this macro, I've been using it for some months now and it works great. I'm now trying to get it installed on a colleagues' computer, and we're running into issues. When importing the FLIR JPEG via the ThermImageJ macro, the following pops up, and the image isn't loaded in. It does this after displaying the 'Verify Camera and Object Parameters' window.

I've tried to run the Byte Swapper plugin via the dropdown 'Plugins' menu and it won't let me do so.

Let me know if you have any thoughts here. Thanks!

@gtatters
Copy link
Owner

gtatters commented Sep 5, 2022

Can you confirm you have installed Byte Swapper? Assuming you have, the error is associated when a user tries to run byte swapper without an image present.

Next time importing it, could you select the "keep default byte order" option at the top of the window just to make sure it successfully can convert and load the image into FIJI first, before running byte swapper.

Also, if you can send a sample of the image or verify that the image loads and operates properly on your version of ThermimageJ. Most common issue I have is people unknowingly loading non-radiometric jpgs.

Also, ThermimageJ won't work with ATS-JPGs - these are formatted differently than other FLIR radiometric jpgs.

@coatej
Copy link
Author

coatej commented Sep 12, 2022

Hi Glenn. Just heard back from my colleague. Byte Swapper is definitely installed. He tried the "keep default byte order" option and this error popped up instead of the previously posted one:
image

The image loads on my version on ThermImageJ, yes. Here's a sample too.

FLIR0153

@gtatters
Copy link
Owner

the image loads fine for me. But if the issue is with the byte swapper plug in on your colleague's computer, I don't know what I can do to help. the language is a macro language, calling many routines within FIJI that should be tested separately. One thing I do advise is to avoid using folder names with white space since the cross-platform compatibility for folder pathing in FIJI is tricky and I am not sure I have it working in all cases.

@gtatters
Copy link
Owner

189580841-506a5809-b746-462f-834e-091db7ca3dc0
Could you try opening this image into FIJI (don't use ThermimageJ to import it) and then verifying if the Byte Swapper works on it? If it doesn't work then it means the issue is with how you have installed Byte Swapper, and you might need to contact the author of that plugin. You said in the opening message that you can't call Byte Swapper from the Plugins menu, which suggests it is not functioning, and ThermimageJ assumes it is functioning.

@gtatters
Copy link
Owner

gtatters commented Sep 12, 2022

189580841-506a5809-b746-462f-834e-091db7ca3dc0_2

With byte swapper the image should toggle back and forth between these two uploaded versions. While the second one looks dark and washed out, that is simply due to the 16 bit span of the radiance values, squished into the grayscale image space.

@gtatters
Copy link
Owner

so, I could replicate nearly the same error you mention in the first post simply by deleting Byte Swapper.class from the Plug-ins folder, suggesting that the Byte Swapper file is not in plug-ins folder. Please verify that the .class file is in the plug-ins folder but it seems to me that the issue is not one with ThermimageJ.

@coatej
Copy link
Author

coatej commented Sep 13, 2022

Thanks for taking a good look here! I really appreciate your efforts. I'll get back to you as soon as I've heard from my colleague.

@coatej
Copy link
Author

coatej commented Sep 14, 2022

Okay, so he's spent the better part of the day looking into this, and still no luck unfortunately, we've hit a wall.

Byte Swapper is definitely within the plug-ins folder, see below screenshot.
image

Regarding the point about just opening image with fiji and then applying byte swapper, this is the issue which came up:
image

So he's now tried uninstalling and deleting everything and starting from scratch. Exiftool, ffpmeg, and perl all verified using bash commands. However perl split.pl script not accessible, see below screenshot. Do you know where/how to change this in the .ijm file?

image

@gtatters
Copy link
Owner

ack! That seems over kill to remove and restart. When I asked for you to try byte swapper on its own, I meant to try it on one of the 16 bit greyscale images I attached not the colourised jpg you attached above. The split.pl file is on this repository website, just download all the files and follow the install instructions or my install video.

@gtatters
Copy link
Owner

to change the paths to conform to the user's installation settings, somewhere around about line 110 in the .ijm file are the various variables that need to be set. This is outlined on the repository installation section:
https://github.com/gtatters/ThermImageJ#setting-and-verifying-paths-to-command-line-tools

@coatej
Copy link
Author

coatej commented Sep 15, 2022

Hi Glenn,

Thanks again for your help here. So after the uninstall and reinstall (we got all the paths working in the end) we attempted your Byte Swapper suggestion with the image you attached. Byte Swapper was able to be called from the plugins menu and it works on images opened through Fiji, toggling between the two.
image
image

However, when uploading through thermimageJ this error still appears:
image

@gtatters
Copy link
Owner

I notice that you have installed FIJI on a university machine Onedrive account? I haven't had much success using these machines because these routines are making read/write operations and need complete write access. If this is the issue, I can't really help with that. I also notice you installed exiftool.exe in an unusual location rather than the default one indicated on the exiftool website. Have you verified that windows has given full access to exiftool at the command line?

@coatej
Copy link
Author

coatej commented Sep 19, 2022

Hi Glenn,
Great news!! You were right about the OneDrive causing issues with analysis. My colleague moved where the FLIR images were stored to his C drive and voila, it worked. Thanks so much for sticking through with us while we fumbled around for the answer! All good now.

@gtatters
Copy link
Owner

Great! I'll close this now. I'm guessing that "synced" drives are aliased differently than actual folders on the local machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants