Skip to content

Commit

Permalink
added shQuote to filename call in readflirJPG function to fix whitesp…
Browse files Browse the repository at this point in the history
…ace issue in windows
  • Loading branch information
gtatters committed Sep 8, 2018
1 parent ac5cbb4 commit 385125b
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 88 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: Thermimage
Type: Package
Title: Thermal Image Analysis
Version: 3.1.0
Date: 2017-11-26
Version: 3.1.1
Date: 2018-09-08
Author: Glenn J. Tattersall
Maintainer: Glenn J. Tattersall <gtatters@brocku.ca>
Description: A collection of functions and routines for inputting thermal
Expand Down
5 changes: 4 additions & 1 deletion R/readflirJPG.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ readflirJPG<-function(imagefile, exiftoolpath="installed")
# http://cactuslab.com/imagemagick/
# v. 2.2.3 fixed error in readflirJPG on a windows OS.
# Credit to John Al-Alawneh for troubleshooting
# v 3.1.1 fixed white space error in readflirJPJG on windows OS


if (!exiftoolpath == "installed") {
exiftoolcheck <- paste0(exiftoolpath, "/exiftool")
Expand Down Expand Up @@ -41,7 +43,8 @@ readflirJPG<-function(imagefile, exiftoolpath="installed")
}
if (Sys.info()["sysname"]=="Windows")
{
info <- shell(paste(syscommand,imagefile,vals))
info <- shell(paste(syscommand, shQuote(imagefile), vals))
# add shQuote around imagefile (Thermimage v 3.1.1)
}

if (exiftoolpath == "") {
Expand Down
23 changes: 13 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ The version here on github is the current, development version. Archived source

# Current release notes

* 2017-11-28: Version 3.1.0 is on Github (development version)
- Added three new functions for converting FLIR jpg, seq, and csq files calling on command line tools.
* 2018-09-08: Version 3.1.1 is on Github (development version)
- Added minor change to readflirJPG function to accomodoate whitespace in file pathing. See Issue #1.

# Previous release notes

* 2017-11-28: Version 3.1.0 is on Github (development version)
- Added three new functions for converting FLIR jpg, seq, and csq files calling on command line tools.

* 2017-10-04: Version 3.0.2 is on Github and Cran
- Minor change to getFrames function to provide reverse ordering of vector.

Expand Down Expand Up @@ -352,19 +355,19 @@ Note: 32-bit video files can be large and difficult to load into ImageJ. Approa

If you have a lot of files and wish simply to analyse images in ImageJ, not in R, then you will want to bulk convert these files. The following methods are available in R, but are based on command line tools that are also described in https://github.com/gtatters/Thermimage/blob/master/BashConvertFLIR.md

### Download and extract sample files to SampleFLIR folder on desktop:
### Download and extract sample files to SampleFLIR folder:
https://github.com/gtatters/Thermimage/blob/master/Uploads/SampleFLIR.zip

```{bash}
cd ~/Desktop/SampleFLIR
cd ~/IRconvert/SampleFLIR
ls
```

### Download and extract perl scripts to perl folder on desktop:
### Download and extract perl scripts to scripts folder:
https://github.com/gtatters/Thermimage/blob/master/Uploads/perl.zip

```{bash}
cd ~/Desktop/perl
cd ~/IRconvert/scripts
ls
```

Expand All @@ -373,7 +376,7 @@ Bulk convert all FLIR jpg files found in folder:
```{r}
library(Thermimage)
setwd("~/Desktop/SampleFLIR")
setwd("~/IRconvert/SampleFLIR")
exiftoolpath <- "installed"
l.files<-list.files(pattern=".jpg", recursive=T, full.names=F, include.dirs=T, no..=T)
Expand All @@ -399,7 +402,7 @@ for(f in l.files){

Converted files are in output folder:
```{bash}
cd ~/Desktop/SampleFLIR
cd ~/IRconvert/SampleFLIR
ls output/
```

Expand All @@ -416,7 +419,7 @@ Bulk convert all FLIR csq files found in folder:

```{r}
library(Thermimage)
setwd("~/Desktop/SampleFLIR")
setwd("~/IRconvert/SampleFLIR")
exiftoolpath <- "installed"
perlpath <- "installed"
Expand All @@ -441,7 +444,7 @@ for(f in l.files){

Converted files are in output folder:
```{bash}
cd ~/Desktop/SampleFLIR
cd ~/IRconvert/SampleFLIR
ls output/
```

Expand Down

0 comments on commit 385125b

Please sign in to comment.