Skip to content

Commit

Permalink
Added timezone to slice labelling and flirdate function
Browse files Browse the repository at this point in the history
  • Loading branch information
gtatters committed May 18, 2019
1 parent 5f70bc8 commit d16b891
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ ffmpeg -version
which ffmpeg
```

## ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
## built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
## configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
## ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
## built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
## configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
## libavutil 56. 22.100 / 56. 22.100
## libavcodec 58. 35.100 / 58. 35.100
## libavformat 58. 20.100 / 58. 20.100
Expand Down
10 changes: 7 additions & 3 deletions toolsets/ThermImageJ.ijm
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,10 @@ function ConvertFLIRVideo(vidtype, outtype, outcodec, converttotemperature, usev
// Time is character 11 through 23

dateoriginal=replace(substring(flirvals, 0, 10), ":", "-");

tz=substring(flirvals, 23, 29);

for(i = 1; i <=nframes; i++){

timeoriginal[i]=substring(flirvals, 11+(i-1)*30, 23+(i-1)*30);
}

Expand Down Expand Up @@ -1041,7 +1043,9 @@ function ConvertFLIRVideo(vidtype, outtype, outcodec, converttotemperature, usev
print("Adding file time origin as slice label");
for (i=1; i<=nSlices; i++) {
setSlice(i);
run("Set Label...", "label=" + timeoriginal[i]);
slicelabel= dateoriginal + "_" + timeoriginal[i] + tz;
print(slicelabel);
run("Set Label...", "label=" + slicelabel);
}

// Set frame interval to stack
Expand Down Expand Up @@ -1326,7 +1330,7 @@ function flirdate(filepath, printvalues){
datetimeoriginal=substring(flirvals, indexOf(flirvals, ":", indexOf(flirvals, "Original"))+1, indexOf(flirvals, "\n", indexOf(flirvals, "Original")) );
dateoriginal=substring(datetimeoriginal, 1, 11);
dateoriginal=replace(dateoriginal, ":", "-");
timeoriginal=substring(datetimeoriginal, 12,24);
timeoriginal=substring(datetimeoriginal, 12,30);

if(printvalues == "Yes"){
Dialog.create("Date/Time Information:");
Expand Down

0 comments on commit d16b891

Please sign in to comment.