Skip to content

Commit

Permalink
added error warning when trying to load a non-radiometric image file …
Browse files Browse the repository at this point in the history
…with readflirjpg. See issues [#7](#7),  [#10](#10),  [#13](#13).
  • Loading branch information
gtatters committed Aug 20, 2020
1 parent 7a0eb2a commit 39abd16
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ README_old.Rmd
SampleFLIRCSQ.csq
/output
.git*
tempfile
.gitignore
6 changes: 6 additions & 0 deletions R/readflirJPG.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ readflirJPG<-function(imagefile, exiftoolpath="installed", headerindex=1)

cams <- flirsettings(imagefile, exiftoolpath, camvals = "")

if(is.null(cams$Info$RawThermalImageType)){
warning("Exiftool cannot extract raw thermal image data.\n Image does not contain FLIR radiometric data.\n Check with the user manual or manufacturer\n or ensure camera is set to save radiometric information.")
}

currentpath <- getwd()
to.read <- file("tempfile", "rb")
alldata <- readBin(to.read, raw(), n = file.info("tempfile")$size)
close(to.read)


if (cams$Info$RawThermalImageType == "TIFF") {
TIFF <- Thermimage::locate.fid(c("54", "49", "46", "46","49", "49"), alldata, zeroindex = FALSE)

Expand Down
7 changes: 5 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The version here on github is the current, development version. Archived source

# Current release notes

2019-12-20: Version 4.1.0 is on Github (development version)
- added the option to split thermal video files based on different filetype/header types. See issue [#9](https://github.com/gtatters/Thermimage/issues/9).
2020-08-20: Version 4.1.1 is on Github (development version)
- added error warning when trying to load a non-radiometric image file with readflirjpg. See issues [#7](https://github.com/gtatters/Thermimage/issues/7), [#10](https://github.com/gtatters/Thermimage/issues/10), [#13](https://github.com/gtatters/Thermimage/issues/13).



Expand Down Expand Up @@ -853,6 +853,9 @@ EEVBlog:

# Previous release notes

- 2019-12-20: Version 4.1.0
- added the option to split thermal video files based on different filetype/header types. See issue [#9](https://github.com/gtatters/Thermimage/issues/9).


- 2019-11-26: Version 4.0.1
- fixed problems with system2 piping calls to ffmpeg on windows machines. See issue [#8](https://github.com/gtatters/Thermimage/issues/8). Added common perl script to package to facilitate splitting fff, tiff, jpegls filetypes. Minor changes to __convertflirVID()__ and __ffmpegcall()__ functions.
Expand Down

0 comments on commit 39abd16

Please sign in to comment.