SciViews / zooimage

Plankton images analysis system
http://www.sciviews.org/zooimage
GNU General Public License v2.0
1 stars 0 forks source link

ImportImg() #1

Closed TeresaSilva closed 6 years ago

TeresaSilva commented 6 years ago

Few error messages! If I manage to understand what is wrong, I will eventually add here some suggestions.

1 test

e.g. "af032000_14.2000-5-10.WA1+A.1.tif"

rootpath2 <- file.path("E:/ZOOIMAGE/2018/testing1_Importing images/data")

importImg()

Error in grepl(pattern, Images[1]) : 
  argument "pattern" is missing, with no default

Another way to do it manually avoiding the error message i.e. zimMake(dir = rootpath2)

2 test,

e.g. select ImportTemplate.zie (scanner images)

rootpath3 <- file.path(
"E:/ZOOIMAGE/2018/testing1_Importing images","Import batch mode")

importImg() Error in grepl(pattern, Images[1]) : argument "pattern" is missing, with no default

is there another way to do it?

I was able to do first steps but could not find which function to work next...

zieCompile(path = rootpath3, Tablefile = "af032000.txt", 
Template = "ImportTemplate.zie")#I was able to create the Import_af032000.zie file... 

To do; change image names from "af032000_001.tif" to "af032000_14.2000-5-10.WA1+A.1.tif"

3 test

select the table. e.g. af032000.txt (scanner file, sample, images...)

(smp<-"E:/ZOOIMAGE/2018/testing1_Importing images/Import batch mode/af032000.txt")
importImg()

Creating .zim files and FitVisParameters.csv...
Error in if (!file.exists(file.path(dirname(path), ImportFile$Exp_Name[i]))) { : 
  argument is of length zero

Note: It seems that importing in batch mode (table.txt and zie file) only works for flowcam!? We don't need FitVisParameters.csv for the scanner images (is that from the flowcam??)

phgrosjean commented 6 years ago

I confirm this bug for tests #1 and #2. It appears when .tif or .jpg files are selected. However, test #3 is different (and not really a bug, because you are supposed to indicate a .txt file from within a FlowCAM data folder that is supposed to have many other files too, and zooimage cannot find them in your test).

TeresaSilva commented 6 years ago

Regarding test #3. Now, I am only testing zooimage for the scanned images. Within the same folder I had the .txt file and the Importemplate.zie file and all the images. Afterwards, I checked the function "ImportImg" and in l. 24 it selects function "zieCompileFlowCAM" and for the scanned images it should select "zieCompile" (if I am correct). I think therefore that the function was not working for the scanned samples.

I could go over this issue by doing the following code (see below). zieCompile(path = rootpath3, Tablefile = "af032000.txt", Template = "ImportTemplate.zie", Filemap="Import_af032000.zie", replace = TRUE,make.it =TRUE) or zieMake(path = rootpath3, Filemap = "Import_af032000.zie", check = TRUE, replace = FALSE, move.to.raw = FALSE, zip.images = "[.]tif$")

warning message:
In zieMake(path = path, Filemap = Filemap, check = TRUE) :
  problem moving the converted file into '_work' subdirectory for 'af032000_001.tif')

But I got another error [issue #4]. Which it seems to be related to the fact that the package saves the original image into raw and it is supposed to convert it to also the "work" directory, see "zieMake" (l.405) .

Even changing the zieMake function to “move.to.raw=FALSE” it didn’t work. zieMake(path = rootpath3, Filemap = "Import_af032000.zie", check = TRUE, replace = FALSE, move.to.raw = FALSE, zip.images = "[.]tif$") within the same folder