Giter Club home page Giter Club logo

wholebrain's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wholebrain's Issues

Registration error

Hello Daniel,

I am trying to process a single image to then translate to the multiple section pipeline, outlined on your website. I can segment the image without issue; however, when registering, the output image is completely white with a black background and I get the following error and warnings:

OUTPUT SEGMENTED CELLS: 2198
> regi<-registration(folder, coordinate=-1.79, filter=seg$filter)
output_10.29B4B5-7-4-2-00028_s3c2_ORG folder created
output_10.29B4B5-7-4-2-00028_s3c2_ORG does not exist
Loading image:C:/Users/Rotenberg/Desktop/Condition A/2PV/10.29B4B5-7-4-2-00028_s3c2_ORG.tif
====== LOADING DONE ======
Resizing to: 0.0256% of original size.
Image type: CV_16U_2
Plate 72 out of 132 
Saved as: C:\Users\ROTENB~1\AppData\Local\Temp\RtmpYZfSCZ/100960236.tif 
Loading image:C:\Users\ROTENB~1\AppData\Local\Temp\RtmpYZfSCZ/100960236.tif
====== LOADING DONE ======
Resizing to: 1% of original size.
Image type: CV_8UC3_16
Image type: CV_8U_0
Loading image:C:/Users/Rotenberg/Desktop/Condition A/2PV/10.29B4B5-7-4-2-00028_s3c2_ORG.tif
Error in transformationgrid$mx[index] : 
  negative values are not allowed in a matrix subscript
In addition: There were 27 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In rbind(coordinates, getIntersection(line, contour[indexExtrapolate[i,  ... :
  number of columns of result is not a multiple of vector length (arg 2)
2: In rbind(coordinates, getIntersection(line, contour[indexExtrapolate[i,  ... :
  number of columns of result is not a multiple of vector length (arg 2)
3: In rbind(coordinates, getIntersection(line, contour[indexExtrapolate[i,  ... :
  number of columns of result is not a multiple of vector length (arg 2)
4: In rbind(coordinates, getIntersection(line, contour[indexExtrapolate[i,  ... :
  number of columns of result is not a multiple of vector length (arg 2)
5: In rbind(coordinates, getIntersection(line, contour[indexExtrapolate[i,  ... :
  number of columns of result is not a multiple of vector length (arg 2)

Let me know what I should change,

Thanks!

update offer to installation instructions for ubuntu

Hello :)
I've been working on installing wholebrain on freshly installed ubuntu 18.04 and I wanted to offer an improvement to the instructions on your website.

  1. installing opencv could be done more easily by using ROpenCVLite (as has been mentioned already in the gitter)
  2. There are some additional libraries I found required for the installation process.
    They could be installed as follows:
    sudo apt-get install ibv8-dev libxml2-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
    install.packages("XML", repos = "http://www.omegahat.net/R")
  3. I had issues trying to installing other R packages before devtools, therefore I suggest installing it first.

Maybe these changes could help other users in the installation process.

I've written my entire installation process, which worked for me on a freshly installed ubuntu 18.04:

On terminal:
sudo apt update && sudo apt upgrade
sudo apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
sudo apt-get -y install r-base
sudo apt-get install fftw3 fftw3-dev pkg-config
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
sudo apt-get install libv8-dev libxml2-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
R (opens R)

In R:
install.packages("devtools")
install.packages("ROpenCVLite")
library(ROpenCVLite)
install.packages("rstan", dependencies = TRUE)
install.packages("XML", repos = "http://www.omegahat.net/R")
devtools::install_github("tractatus/wholebrain") (choose to not update any dependencies)

Some problems install rstan in windows 10

when I have install rstan an run the test code in the website ,there are some problem :
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! make: *** No rule to make target '$(CXX11STD)''. Stop.
此外: Warning message:
In system(cmd, intern = !verbose) :
运行命令'C:/PROGRA1/R/R-361.3/bin/x64/R CMD SHLIB file2e7c58eb3c09.cpp 2> file2e7c58eb3c09.cpp.err.txt'的状态是1
Error in sink(type = "output") : 链结不对

And in the website you said that Download the OpenCVCompilerOptions.cmake file from here but no link ,where can I download it?

Error in createfilter(filename) : could not find function "createfilter"

Hi Daniel,

First of all, thanks for sharing your great work and for being responsive to the issues. I am working on a containerized version of your code to run it on a high-performance computing cluster and I almost got there. In fact, I could get the screenshot below at some point. But later on, R couldn't find the "createfilter" function library from the Namespace? Could you please have a look?

Screen Shot 2019-12-19 at 4 36 12 PM

library(wholebrain)
Loading required package: Rcpp
Loading required package: png
Loading required package: MASS
Loading required package: grImport
Loading required package: grid
Loading required package: XML
Loading required package: sp
Loading required package: rgl
Loading required package: misc3d
Loading required package: plyr
WholeBrain (version 0.1.35) "Thurstone"
by Daniel Fürth, 2018, by using this software you agree to the EULA
filename<-system.file('sample_tiles/rabiesEGFP.tif', package='wholebrain')
filter<-createfilter(filename)
Error in createfilter(filename) : could not find function "createfilter"

The performance of segment process

recently, I deal with some cell level data with wholebrain.
for some test case, it works fine.

but, for real full data with about 50000 cells......the interactive segment process become very slow.
when change a para on control panel, I have to wait for 10+ min to see the result.

with a lower downsample para, the cells couldn't be recognized one by one, but a big cluster.

so the adjustment of brain outline is also difficult because it affected by the cells.

is there any tips to pass by this problem?

for example, to decide the brain outline with lower sample para, then segment the cells with higher sample para?
or
it uses only one thread to do this while my workstation have 120 Xeon core and a RTX3090 graphic card

微信图片_20210910033114

problems with the segmetation command

hi daniel!

first of all i really like your idea of wholebrain and i would love to work with it!
however i'm having some troubles using it. so far we only managed to install it on one computer only, which is a linux. but there it works fine so this is ok for now.
my main problem at the moment is the segmentation function. i can use the command "segment(xy)", my image, the controls (like 8-bit render, eccentricity, etc) and the histogram open up. but this is where i'm struggeling:

  1. for the 8-bit render i have to use the smallest setting (like 0-225) to actually see something - and it's still pretty dark. this also counts for the intensity setting, to set which dots are indeed cells and which are not. this makes it really hard to vary the scales to find the optimal setting.

  2. the brain outline keeps disappearing. usually it appears when i open the image. but as soon as i change any of the settings, it disappears. sometimes it comes back for a second, sometimes it doesn't. additionally it doesn't encircle the whole brain, but always leaves a small spot open at the edge. the lines of the brain outline not only leave the brain "open", but they "shoot" to the edge of the image in a straight line.

i've attached two pictures (i hope this works..) which might give you an idea about my problems with the control settings and the brain outline. i'd really appreciate your help.

best regards,
rebecca

settings
brain outline

installing on windows 10

Hello,
I am having some issues installing the software on a new computer. I have done everything the same way as I did while installing the software on an older laptop.
I get the following output from R:

Downloading GitHub repo tractatus/wholebrain@master
     
   checking for file 'C:\Users\Rotenberg-admin\AppData\Local\Temp\RtmpQVKVBX\remotes3b44bee4\tractatus-wholebrain-8e12757/DESCRIPTION' ...
  
√  checking for file 'C:\Users\Rotenberg-admin\AppData\Local\Temp\RtmpQVKVBX\remotes3b44bee4\tractatus-wholebrain-8e12757/DESCRIPTION'

  
  
  
-  preparing 'wholebrain': (2.6s)
   checking DESCRIPTION meta-information ...
  
√  checking DESCRIPTION meta-information
-  cleaning src

  
  
  
-  checking for LF line-endings in source and make files and shell scripts

  
  
  
-  checking for empty or unneeded directories (1.2s)

  
  
  
-  looking to see if a 'data/datalist' file should be added

  
  
  
-  building 'wholebrain_0.1.1.tar.gz' (2s)

  
   

* installing *source* package 'wholebrain' ...
** using staged installation
** libs
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c CThinPlateSpline.cpp -o CThinPlateSpline.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c CoherentPointShift.cpp -o CoherentPointShift.o
CoherentPointShift.cpp: In function 'SEXPREC* CoherentPointDriftRegistration(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
CoherentPointShift.cpp:24:12: warning: unused variable 'beta' [-Wunused-variable]
     double beta = Rcpp::as<double>(betaR);
            ^
CoherentPointShift.cpp:25:12: warning: unused variable 'lambda' [-Wunused-variable]
     double lambda = Rcpp::as<double>(lambdaR);
            ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c DoubleSlider.cpp -o DoubleSlider.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c ThinPlateSpline.cpp -o ThinPlateSpline.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c Widget.cpp -o Widget.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c affine.cpp -o affine.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c connectedcomponents3D.cpp -o connectedcomponents3D.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c display.cpp -o display.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c filter.cpp -o filter.o
filter.cpp: In function 'void FindBlobs(const cv::Mat&, std::vector<std::vector<cv::Point_<int> > >&, int)':
filter.cpp:142:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if(blob.size()>lengthlimitation){
                           ^
filter.cpp: In function 'void stepwisethreshold(const cv::Mat&, std::vector<int>, bool, double, double, std::vector<std::vector<cv::Point_<int> > >&, std::vector<cv::Vec<int, 4> >&, cv::Mat&)':
filter.cpp:317:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for( int i = 0; i< contours.size(); i++ ){
                      ^
filter.cpp: In member function 'void StepThreshold::runthreshold()':
filter.cpp:383:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (unsigned int j=0; j<numThresholds; j++){
                               ^
filter.cpp:388:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (unsigned int i=0; i<numThresholds; i++) {
                               ^
filter.cpp:452:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< contours.size(); i++ ){
                          ^
filter.cpp:461:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< contours.size(); i++ ){
                          ^
filter.cpp:476:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< contours.size(); i++ ){
                          ^
filter.cpp: In function 'void copySourceTile(const cv::Mat&, cv::Mat&, cv::Rect&)':
filter.cpp:676:10: warning: variable 'tl' set but not used [-Wunused-but-set-variable]
     auto tl = tile.tl();
          ^
filter.cpp: In function 'SEXPREC* getContours(SEXP, SEXP, SEXP)':
filter.cpp:928:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for( int i = 0; i< contours.size(); i++ )
                      ^
filter.cpp: In function 'SEXPREC* filterImage(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
filter.cpp:1062:9: warning: unused variable 'oldRowW' [-Wunused-variable]
     int oldRowW = rowsW;
         ^
filter.cpp:1065:10: warning: variable 'oldsize' set but not used [-Wunused-but-set-variable]
     Size oldsize = tobefiltered.size();
          ^
filter.cpp:1002:7: warning: unused variable 'nofilter' [-Wunused-variable]
   int nofilter = Rcpp::as<int>(noFilter); //change to bool
       ^
filter.cpp:1003:7: warning: unused variable 'filterminArea' [-Wunused-variable]
   int filterminArea = Rcpp::as<int>(filter_minArea);
       ^
filter.cpp:1004:7: warning: unused variable 'filtermaxArea' [-Wunused-variable]
   int filtermaxArea = Rcpp::as<int>(filter_maxArea);
       ^
filter.cpp:1005:7: warning: unused variable 'filterminThresh' [-Wunused-variable]
   int filterminThresh = Rcpp::as<int>(filter_minThresh);
       ^
filter.cpp:1006:7: warning: unused variable 'filtermaxThresh' [-Wunused-variable]
   int filtermaxThresh = Rcpp::as<int>(filter_maxThresh);
       ^
filter.cpp:1007:7: warning: unused variable 'filtereccentricity' [-Wunused-variable]
   int filtereccentricity = Rcpp::as<int>(filter_eccentricity);
       ^
In file included from C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/core.hpp:58:0,
                 from C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/opencv.hpp:52,
                 from filter.cpp:2:
C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/core/types.hpp: In function 'SEXPREC* createTiles(SEXP, SEXP, SEXP, SEXP, SEXP)':
C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/core/types.hpp:1828:50: warning: 'y0' may be used uninitialized in this function [-Wmaybe-uninitialized]
     : x(_x), y(_y), width(_width), height(_height) {}
                                                  ^
filter.cpp:796:9: note: 'y0' was declared here
     int y0;
         ^
In file included from C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/core.hpp:58:0,
                 from C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/opencv.hpp:52,
                 from filter.cpp:2:
C:\WHOLEB~1\R\R361\library\opencv\include/opencv2/core/types.hpp:1828:50: warning: 'x0' may be used uninitialized in this function [-Wmaybe-uninitialized]
     : x(_x), y(_y), width(_width), height(_height) {}
                                                  ^
filter.cpp:795:9: note: 'x0' was declared here
     int x0;
         ^
filter.cpp:793:16: warning: 'newWidth' may be used uninitialized in this function [-Wmaybe-uninitialized]
     finalImage = Mat::zeros(newHeight, newWidth, sourceImage.type());
                ^
filter.cpp:793:16: warning: 'newHeight' may be used uninitialized in this function [-Wmaybe-uninitialized]
filter.cpp: In function 'SEXPREC* interactiveThreshold(SEXP, SEXP)':
filter.cpp:605:55: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
     pd.src.convertTo(srcFloat,CV_32F,255/(double)depth);
                                                       ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c flatfieldcorrection.cpp -o flatfieldcorrection.o
flatfieldcorrection.cpp: In function 'void getGain(int, int, int, std::vector<cv::Mat>&, cv::Mat&, bool)':
flatfieldcorrection.cpp:64:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(size_t s = 0; s != STACKS; ++s){
                               ^
flatfieldcorrection.cpp:45:7: warning: unused variable 'i' [-Wunused-variable]
   int i;
       ^
flatfieldcorrection.cpp: In function 'SEXPREC* posteriorFFC(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
flatfieldcorrection.cpp:170:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(size_t s = 0; s != num_files; ++s){
                      ^
flatfieldcorrection.cpp:108:7: warning: unused variable 'DISPLAY' [-Wunused-variable]
   int DISPLAY = Rcpp::as<int>(display);
       ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c gauss_transform.cpp -o gauss_transform.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c gauss_transform_make_default.cpp -o gauss_transform_make_default.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c getContour.cpp -o getContour.o
getContour.cpp: In function 'SEXPREC* getContour(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
getContour.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for( int i = 0; i < contours.size(); i++ )
                     ^
getContour.cpp:150:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for( int i = 0; i < contours.size(); i++ )
                     ^
getContour.cpp:155:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for( int i = 0; i< contours.size(); i++ )
                    ^
getContour.cpp:174:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for( int i = 0; i< contours.size(); i++ )
                    ^
getContour.cpp:191:103: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::vector<std::vector<cv::Point_<int> > >::size_type {aka long long unsigned int}' [-Wformat=]
       printf("Largest contour: %d, # contours detected: %d \n", largest_contour_index, contours.size());
                                                                                                       ^
getContour.cpp:203:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for( int i = 0; i< contours.size(); i++ ){
                     ^
getContour.cpp:210:48: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<std::vector<cv::Point_<int> > >::size_type {aka long long unsigned int}' [-Wformat=]
     printf("LOOP DONE: %d \n", contours.size() ); 
                                                ^
getContour.cpp:238:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int j = 0; j < contours[*it].size(); ++j){
                      ^
getContour.cpp:251:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int j = 0; j < contours[0].size(); ++j){
                         ^
getContour.cpp: In function 'SEXPREC* nuclearSegment(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
getContour.cpp:694:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i< contours.size(); ++i){
                   ^
getContour.cpp:695:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int j = 0; j < contours[i].size(); ++j){
                      ^
getContour.cpp:714:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i< contours.size(); ++i){
                    ^
getContour.cpp:715:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int j = 0; j < contours[i].size(); ++j){
                      ^
getContour.cpp:363:7: warning: unused variable 'numNested' [-Wunused-variable]
   int numNested = Rcpp::as<int>(getNested);
       ^
getContour.cpp:728:5: warning: unused variable 'numOfSegments2' [-Wunused-variable]
 int numOfSegments2 = contoursDist.size();
     ^
getContour.cpp:472:71: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
     threshold(img, img_bw, 0, depth, CV_THRESH_BINARY | CV_THRESH_OTSU);
                                                                       ^
getContour.cpp: In function 'SEXPREC* getContour(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
getContour.cpp:123:59: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
     threshold(img, img_bw, thresh, depth, CV_THRESH_BINARY);
                                                           ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c imageconverter.cpp -o imageconverter.o
imageconverter.cpp: In function 'SEXPREC* morphologyEx(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
imageconverter.cpp:179:7: warning: unused variable 'morph_elem' [-Wunused-variable]
   int morph_elem = Rcpp::as<int>(morphElem);// 0;
       ^
imageconverter.cpp:182:13: warning: unused variable 'max_operator' [-Wunused-variable]
   int const max_operator = 4;
             ^
imageconverter.cpp:183:13: warning: unused variable 'max_elem' [-Wunused-variable]
   int const max_elem = 2;
             ^
imageconverter.cpp:184:13: warning: unused variable 'max_kernel_size' [-Wunused-variable]
   int const max_kernel_size = 21; //"Kernel size:\n 2n +1"
             ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c laplacianpyramidblending.cpp -o laplacianpyramidblending.o
laplacianpyramidblending.cpp: In member function 'void LaplacianBlending::buildGaussianPyramid()':
laplacianpyramidblending.cpp:42:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (leftLapPyr.size() > l) {
                                   ^
laplacianpyramidblending.cpp: In function 'void placeCenterTiles(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vector<cv::Mat>&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:225:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(size_t s = 0; s != STACKS; ++s){
                               ^
laplacianpyramidblending.cpp: In function 'void placeHorizontalOverlap(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vector<cv::Mat>&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:327:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(size_t s = 0; s < STACKS; ++s){
                               ^
laplacianpyramidblending.cpp: In function 'void placeVerticalOverlap(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vector<cv::Mat>&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:419:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(size_t s = 0; s < STACKS; ++s){
                               ^
laplacianpyramidblending.cpp: In function 'void placeSmallOverlap(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vector<cv::Mat>&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:505:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(size_t s = 0; s < STACKS; ++s){
                               ^
laplacianpyramidblending.cpp: In function 'SEXPREC* LaplacianBlendPipe(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
laplacianpyramidblending.cpp:559:7: warning: unused variable 'verticaltiles' [-Wunused-variable]
   int verticaltiles = Rcpp::as<int>(nrows);
       ^
laplacianpyramidblending.cpp:560:7: warning: unused variable 'horizontaltiles' [-Wunused-variable]
   int horizontaltiles = Rcpp::as<int>(ncols);
       ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c lwtimagetest.cpp -o lwtimagetest.o
In file included from lift.h:34:0,
                 from lwave.h:35,
                 from lwtimagetest.cpp:18:
Laurent.h: In instantiation of 'Laurent<T>::Laurent() [with T = double]':
lift.h:703:20:   required from here
Laurent.h:45:6: warning: unused variable 'degree' [-Wunused-variable]
  int degree=0;
      ^
Laurent.h:47:6: warning: unused variable 'highest' [-Wunused-variable]
  int highest = 0;
      ^
In file included from lwtimagetest.cpp:18:0:
lwave.h: In constructor 'lwt2<T>::lwt2(std::vector<_RealType>&, int, int, liftscheme&) [with T = double]':
lwave.h:372:7: warning: 'rows_ll' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int rows_ll,cols_ll,rows_lh,cols_lh;
       ^
lwave.h:372:23: warning: 'rows_lh' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int rows_ll,cols_ll,rows_lh,cols_lh;
                       ^
lwave.h:399:23: warning: 'rows_hh' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int rows_hl,cols_hl,rows_hh,cols_hh;
                       ^
lwave.h:399:7: warning: 'rows_hl' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int rows_hl,cols_hl,rows_hh,cols_hh;
       ^
In file included from lwave.h:36:0,
                 from lwtimagetest.cpp:18:
alg.h:78:3: warning: 'cols_H' may be used uninitialized in this function [-Wmaybe-uninitialized]
   for (int j=0; j < rows; j++) {
   ^
In file included from lwtimagetest.cpp:18:0:
lwave.h:351:28: note: 'cols_H' was declared here
   int rows_L,cols_L,rows_H,cols_H;
                            ^
In file included from lwave.h:36:0,
                 from lwtimagetest.cpp:18:
alg.h:78:3: warning: 'cols_L' may be used uninitialized in this function [-Wmaybe-uninitialized]
   for (int j=0; j < rows; j++) {
   ^
In file included from lwtimagetest.cpp:18:0:
lwave.h:351:14: note: 'cols_L' was declared here
   int rows_L,cols_L,rows_H,cols_H;
              ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c makeAtlasNissl.cpp -o makeAtlasNissl.o
makeAtlasNissl.cpp: In function 'SEXPREC* getAtlasNissl(SEXP, SEXP)':
makeAtlasNissl.cpp:61:10: warning: unused variable 'resizeParam' [-Wunused-variable]
   double resizeParam = (double)(7900/395);
          ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c manualsegmentation.cpp -o manualsegmentation.o
manualsegmentation.cpp: In member function 'void Segmentation::runthreshold()':
manualsegmentation.cpp:219:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for( int i = 0; i < brainContours.size(); i++ ){ 
                         ^
manualsegmentation.cpp:225:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for( int i = 0; i < brainContours.size(); i++ )
                         ^
manualsegmentation.cpp:236:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for( int i = 0; i< brainContours.size(); i++ )
                        ^
manualsegmentation.cpp:254:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< brainContours.size(); i++ ){
                          ^
manualsegmentation.cpp:287:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (unsigned int j=0; j<numThresholds; j++){
                               ^
manualsegmentation.cpp:292:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (unsigned int i=0; i<numThresholds; i++) {
                               ^
manualsegmentation.cpp:356:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < contours[k].size(); ++j){
                                   ^
manualsegmentation.cpp:388:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< contours.size(); i++ ){
                          ^
manualsegmentation.cpp:401:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< contours.size(); i++ ){
                          ^
manualsegmentation.cpp:417:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for( int i = 0; i< contours.size(); i++ ){
                          ^
manualsegmentation.cpp: In function 'SEXPREC* imageshow(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
manualsegmentation.cpp:848:7: warning: variable 'depth' set but not used [-Wunused-but-set-variable]
   int depth;
       ^
manualsegmentation.cpp: In function 'SEXPREC* GUI(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
manualsegmentation.cpp:1189:24: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   if(channelOfInterest != 0 & pd.src.type()!=16 ){
                        ^
manualsegmentation.cpp:1281:55: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
     pd.src.convertTo(srcFloat,CV_32F,255/(double)depth);
                                                       ^
manualsegmentation.cpp: In function 'SEXPREC* imageshow(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
manualsegmentation.cpp:909:50: warning: array subscript is above array bounds [-Warray-bounds]
     intensitySliderImage.maxValue = rangeValues[6];
                                                  ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c matrix.cpp -o matrix.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c multiresolutiondecomposition.cpp -o multiresolutiondecomposition.o
multiresolutiondecomposition.cpp: In function 'SEXPREC* multiresolutiondecomposition(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
multiresolutiondecomposition.cpp:165:9: warning: unused variable 'oldRowW' [-Wunused-variable]
     int oldRowW = rowsW;
         ^
multiresolutiondecomposition.cpp:168:10: warning: variable 'oldsize' set but not used [-Wunused-but-set-variable]
     Size oldsize = tobefiltered.size();
          ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c nonrigid.cpp -o nonrigid.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c normalization.cpp -o normalization.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c rigid.cpp -o rigid.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c transform.cpp -o transform.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c utils.cpp -o utils.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c wavelet2d.cpp -o wavelet2d.o
C:/WHOLEB~1/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/WHOLEB~1/R/R361/include" -DNDEBUG -I"C:\WHOLEB~1\R\R361\library\opencv\include\opencv2" -I"C:\WHOLEB~1\R\R361\library\opencv\include" -I"C:\WHOLEB~1\R\R361\library\opencv\x64\mingw\bin" -I"C:\FFTW/" -I../inst/include -I"C:/WholeBrain/R/R361/library/Rcpp/include"     -IC:/WholeBrain/R/R361/library/Rcpp/include   -O2 -Wall  -mtune=generic -c webfiles.cpp -o webfiles.o
webfiles.cpp: In function 'void copySrcTile(const cv::Mat&, cv::Mat&, cv::Rect&)':
webfiles.cpp:19:10: warning: variable 'tl' set but not used [-Wunused-but-set-variable]
     auto tl = tile.tl();
          ^
C:/WHOLEB~1/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o wholebrain.dll tmp.def CThinPlateSpline.o CoherentPointShift.o DoubleSlider.o ThinPlateSpline.o Widget.o affine.o connectedcomponents3D.o display.o filter.o flatfieldcorrection.o gauss_transform.o gauss_transform_make_default.o getContour.o imageconverter.o laplacianpyramidblending.o lwtimagetest.o makeAtlasNissl.o manualsegmentation.o matrix.o multiresolutiondecomposition.o nonrigid.o normalization.o rigid.o transform.o utils.o wavelet2d.o webfiles.o -LC:\WHOLEB~1\R\R361\library\opencv\x64\mingw\lib -lopencv_calib3d410 -lopencv_core410 -lopencv_features2d410 -lopencv_flann410 -lopencv_gapi410 -lopencv_highgui410 -lopencv_imgcodecs410 -lopencv_imgproc410 -lopencv_ml410 -lopencv_objdetect410 -lopencv_photo410 -lopencv_stitching410 -lopencv_video410 -lopencv_videoio410 -LC:\FFTW/ -lfftw3-3 -L..inst/include/x64 -LC:/WHOLEB~1/R/R361/bin/x64 -lR
installing to C:/WholeBrain/R/R361/library/00LOCK-wholebrain/00new/wholebrain/libs/x64
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'wholebrain'
    finding HTML links ... done
    add.group                               html  
    cortical.plot                           html  
    cortical.sideview                       html  
    cortical.topview                        html  
    data.summary                            html  
    find.dim                                html  
    flat.field.correction                   html  
    get.atlas.image                         html  
    get.contour                             html  
    get.cortex.layer                        html  
    get.grid.coordinates                    html  
    get.images                              html  
    get.pixel.intensity                     html  
    get.region.volume                       html  
    makewebmap                              html  
    normalize.volume                        html  
    nuclear.segment                         html  
    prune.spots                             html  
    reflect.cells                           html  
    registration                            html  
    remove.spot.outliers                    html  
    rgb2gray                                html  
    roi.cell.count                          html  
    segment                                 html  
    stitch                                  html  
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'wholebrain' in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/WholeBrain/R/R361/library/00LOCK-wholebrain/00new/wholebrain/libs/x64/wholebrain.dll':
  LoadLibrary failure:  The specified module could not be found.

Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/WholeBrain/R/R361/library/wholebrain'
Error: Failed to install 'wholebrain' from GitHub:
  (converted from warning) installation of package ‘C:/Users/ROTENB~1/AppData/Local/Temp/RtmpQVKVBX/file3b436454275/wholebrain_0.1.1.tar.gz’ had non-zero exit status
>

Any suggestions?

Thank you!

wholebrain.so: undefined symbol: _ZN2cv3MatD1Ev

OS: centOS8
ROpenCVLite and openCV: 4.52
gcc g++: 8.5.0 20210514

all work fine during the installation until the last step, I want get some help to find which part is wrong:

g++ -std=c++11 -shared -L/home/lascqy/workdir/soft/R/lib64/R/lib -L/usr/local/lib64 -o wholebrain.so CThinPlateSpline.o CoherentPointShift.o DoubleSlider.o ThinPlateSpline.o Widget.o affine.o connectedcomponents3D.o display.o filter.o flatfieldcorrection.o gauss_transform.o gauss_transform_make_default.o getContour.o imageconverter.o laplacianpyramidblending.o lwtimagetest.o makeAtlasNissl.o manualsegmentation.o matrix.o multiresolutiondecomposition.o nonrigid.o normalization.o rigid.o transform.o utils.o wavelet2d.o webfiles.o -L/usr/local/lib/ -lfftw3 -llapack -Wl,-rpath=/home/lascqy/workdir/soft/R/lib64/R/library/opencv/lib64 -L/home/lascqy/workdir/soft/R/lib64/R/library/opencv/lib64 -L/home/lascqy/workdir/soft/R/lib64/R/lib -lR
installing to /home/lascqy/workdir/soft/R/lib64/R/library/00LOCK-wholebrain/00new/wholebrain/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘wholebrain’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/lascqy/workdir/soft/R/lib64/R/library/00LOCK-wholebrain/00new/wholebrain/libs/wholebrain.so':
/home/lascqy/workdir/soft/R/lib64/R/library/00LOCK-wholebrain/00new/wholebrain/libs/wholebrain.so: undefined symbol: _ZN2cv3MatD1Ev
Error: loading failed
Execution halted
ERROR: loading failed

Some errors when I using registration

I try the wholebrain using the code and data in wholebrain website for single section:

regi<-registration(FFC_filename, coordinate=0.38, filter=seg$filter)
and return:
Loading image:/home/wzfish/Downloads/stitched_FFC_section001/stitched_FFC_section001.tif
====== LOADING DONE ======
Resizing to: 0.0168% of original size.
Image type: CV_16U_2
Error in get.contour(file, thresh = brain.threshold, resize = resize, :
OpenCV(4.3.0) /tmp/RtmpHbUcHd/opencv-4.3.0/modules/imgproc/src/thresh.cpp:1529: error: (-215:Assertion failed) src.type() == CV_8UC1 in function 'threshold'

I installed the opencv4.3.0 by RopenCVLite.
Thank you!

Problems with Install (Mac Mojave 10.14.6)

Hello @tractatus,
I am installing whole brain on Mac Mojave 10.14.6 with the following versions of each component:

Xcode 11.2.1
Xquartz 2.7.11
fftw 3.3.8_1
OpenCV 4.1.2

Everything went as instructed until the final step of the installation (if (!require(devtools)) {
install.packages("devtools")
}
devtools::install_github("tractatus/wholebrain", args='--no-multiarch')

after which I receive the following error:
Error: package or namespace load failed for ‘wholebrain’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-wholebrain/00new/wholebrain/libs/wholebrain.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-wholebrain/00new/wholebrain/libs/wholebrain.so, 6): Symbol not found: __ZN2cv19getRotationMatrix2DENS_6Point_IfEEdd
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-wholebrain/00new/wholebrain/libs/wholebrain.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-wholebrain/00new/wholebrain/libs/wholebrain.so
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/wholebrain’
    Error: Failed to install 'wholebrain' from GitHub:
    (converted from warning) installation of package ‘/var/folders/hb/njx9dl2951s03hfxcr_r_xtr0000gn/T//RtmpKkeYLV/file45924ec64f8b/wholebrain_0.1.1.tar.gz’ had non-zero exit status

Any advice would be greatly appreciated. Thank you!

Non-orthogonal cutting plane

Great tool! I am curious, is whole-brain able to align sections with severe dorso-ventral skew? as in can we select arbitrary planes through the reference atlas or only warp a coronal/sagittal/horizontal section to fit a skewed slice?

Correspondence points issue

Hi Daniel,

I encountered another issue during registration that I hope you can help me with. I changed the seg$filter$resize to 0.1; however, along with taking around 5 minutes to load (I assume due to the size of the image) the registration on the left (atlas) has all the correspondence points in a tiny area in the middle with no overlay while the target has the correct correspondence points. The following is the output I receive after running:

seg$filter$resize <-0.1
quartz()
regi<-registration(folder, coordinate=-1.79, filter=seg$filter)

Capture

Thanks for the help

imshow() on 8-bit gray tif

while using imshow() with the example pics, it works fine for 16-bit depth tif.
but it can't adjust my 8-bit depth tif even with the toolbar marked with 8-bit render.

So is there any tips for the 8-bit depth pic or I should convert my tif to 16-bit mode?

微信图片_20210825003943

微信截图_20210825005053

Install error on Windows 10

Hello!
Hi Daniel, Thank you for all your hard work on wholebrain! I followed your tutorial, but at Step 8 I get the following error:

C:/WHOLEB~1/Rtools/mingw_32/bin/g++` -shared -s -static-libgcc -o wholebrain.dll tmp.def CThinPlateSpline.o CoherentPointShift.o DoubleSlider.o ThinPlateSpline.o Widget.o affine.o connectedcomponents3D.o display.o filter.o flatfieldcorrection.o gauss_transform.o gauss_transform_make_default.o getContour.o imageconverter.o laplacianpyramidblending.o lwtimagetest.o makeAtlasNissl.o manualsegmentation.o matrix.o multiresolutiondecomposition.o nonrigid.o normalization.o rigid.o transform.o utils.o wavelet2d.o webfiles.o -LC:\WHOLEB~1\R\R-36~1.1\library\opencv\x86\mingw\lib -lopencv_calib3d410 -lopencv_core410 -lopencv_features2d410 -lopencv_flann410 -lopencv_gapi410 -lopencv_highgui410 -lopencv_imgcodecs410 -lopencv_imgproc410 -lopencv_ml410 -lopencv_objdetect410 -lopencv_photo410 -lopencv_stitching410 -lopencv_video410 -lopencv_videoio410 -LC:\fftw/ -lfftw3-3 -L..inst/include/x64 -LC:/WHOLEB~1/R/R-36~1.1/bin/i386 -lR

C:\fftw//libfftw3-3.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'wholebrain'
* removing 'C:/WholeBrain/R/R-3.6.1/library/wholebrain'
Error: Failed to install 'wholebrain' from GitHub:
  (converted from warning) installation of package ‘C:/Users/Mustafa/AppData/Local/Temp/RtmpWusMPR/file52901d106a7b/wholebrain_0.1.1.tar.gz’ had non-zero exit status
Error: 1 components of `...` were not used.

We detected these problematic arguments:
* `args`

Did you misspecify an argument?
Call `rlang::last_error()` to see a backtrace

Please help!
Thanks

wholebrainsoftware.org

Seems to be an issue with the domain name. Is there a new location for installation instructions/etc?

Trouble Installing Linux - GNU Linker typo

Hello,

I wanted to report an issue installing wholebrain on CentOS 7. When running:

devtools::install_github("tractatus/wholebrain")

every library builds except 'wholebrain.so':

g++ -std=gnu++11 -shared -L/share/pkg.7/r/3.6.0/install/lib64/R/lib -L/usr/local/lib64 -o wholebrain.so CThinPlateSpline.o CoherentPointShift.o DoubleSlider.o ThinPlateSpline.o Widget.o affine.o connectedcomponents3D.o display.o filter.o flatfieldcorrection.o gauss_transform.o gauss_transform_make_default.o getContour.o imageconverter.o laplacianpyramidblending.o lwtimagetest.o makeAtlasNissl.o manualsegmentation.o matrix.o multiresolutiondecomposition.o nonrigid.o normalization.o rigid.o transform.o utils.o wavelet2d.o webfiles.o -L/usr/local/lib/ -lfftw3 -lm -llapack -Wl,-rpath=/usr3/bustaff/clarkdc/R/x86_64-pc-linux-gnu-library/3.6/opencv/lib -L/usr3/bustaff/clarkdc/R/x86_64-pc-linux-gnu-library/3.6/opencv/lib -l -L/share/pkg.7/r/3.6.0/install/lib64/R/lib -lR
/usr/bin/ld: cannot find -l-L/share/pkg.7/r/3.6.0/install/lib64/R/lib

There seems to be a missing input to the last '-l' linker flag. Pasting this command to the terminal without the empty '-l' builds the 'wholebrain.so' properly but loading wholebrain with library(wholebrain) with every library built results in the error ''wholebrain' is not a valid installed pacakge'.

-Dustin

Problems with dot.plot()

Hi,

first of all thank you for writing this package. I just started using it and I think it will potentially be very helpful in the future.

I noticed a problem with the dot.plot() function. If all detected cells are only in one hemisphere there will be an error.

> dot.plot(Ntsr1Cre_2018_0003_23)
Error in rep(2.5, nrow(counts)) : invalid 'times' argument

I could come over this error by changing one value in right.hemisphere from False to True. But then I get another error message

> Ntsr1Cre_2018_0003_23$right.hemisphere[1]<-TRUE
> dot.plot(Ntsr1Cre_2018_0003_23)
Error in plot.new() : figure margins too large

clang error when executing ROpenCVLite::installOpenCV()

Hi,

I'm trying to install wholebrain in R but kept on running into this error message towards the latter part of the install:

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried to look up how to fix this error but couldn't find a suitable solution. I noticed that at around 45% of the install a number of warning messages started to show up related to undefined symbols. The screenshot of the error message above mentions this as well at the beginning. How can I fix this?

I am using macOS Catalina 10.15.7 and R 4.0.3.

Screenshot 2020-10-13 at 00 07 19

Installation problems

I have a problem while installing ROpenCVLite on my Windows. I execute the following command and receive the error message:

devtools::install_github("swarm-lab/ROpenCVLite")
Skipping install of 'ROpenCVLite' from a github remote, the SHA1 (783a2f04) has not changed since last install.
Use force = TRUE to force installation
devtools::install_github("swarm-lab/ROpenCVLite", force=TRUE)
Downloading GitHub repo swarm-lab/ROpenCVLite@master
checking for file 'C:\Users\user\AppData\Local\Temp\Rtmpym4vYp\remotes23b8441c724d\swarm-lab-ROpenCVLite-783a2f0/DESCRIPTION' ...
checking for file 'C:\Users\user\AppData\Local\Temp\Rtmpym4vYp\remotes23b8441c724d\swarm-lab-ROpenCVLite-783a2f0/DESCRIPTION' ...
√ checking for file 'C:\Users\user\AppData\Local\Temp\Rtmpym4vYp\remotes23b8441c724d\swarm-lab-ROpenCVLite-783a2f0/DESCRIPTION'

  • preparing 'ROpenCVLite': (377ms)
    checking DESCRIPTION meta-information ...
    checking DESCRIPTION meta-information ...
    √ checking DESCRIPTION meta-information
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Removed empty directory 'ROpenCVLite/man/figures'
  • building 'ROpenCVLite_4.30.1.tar.gz'
    Warning:
    Warning: file 'ROpenCVLite/configure' did not have execute permissions: corrected
    Installing package into ‘C:/Users/user/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)
  • installing source package 'ROpenCVLite' ...
    Error in system("sh ./configure.win") :
    (converted from warning) 'sh' not found
  • removing 'C:/Users/user/Documents/R/win-library/3.5/ROpenCVLite'
  • restoring previous 'C:/Users/user/Documents/R/win-library/3.5/ROpenCVLite'
    In R CMD INSTALL
    Error: Failed to install 'ROpenCVLite' from GitHub:
    (converted from warning) installation of package ‘C:/Users/user/AppData/Local/Temp/Rtmpym4vYp/file23b832224d3c/ROpenCVLite_4.30.1.tar.gz’ had non-zero exit status

Can you please help me understand this issue?

Issues installing on MacOS Mojave

Hello,

I am having some issues installing the software. I am using MacOS Mojave 10.14.6. I am using OpenCV version 4.1.0_1. The error I receive is:

installing to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘wholebrain’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs/wholebrain.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs/wholebrain.so, 6): Library not loaded: @rpath/libopencv_calib3d.4.0.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs/wholebrain.so
  Reason: image not found

Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain’
Error: Failed to install 'wholebrain' from GitHub:
  (converted from warning) installation of package ‘/var/folders/h7/c6g9qc8j25l92b58yr_jbc2h0000gn/T//RtmpTUVYSu/filea7c527751bbd/wholebrain_0.1.1.tar.gz’ had non-zero exit status`

Any help would be much appreciated. Thank you

Inconsistent lengths of style and numPaths on plate 102

I'm having an issue with the number of paths and the available style for them on the EPSatlas

EPSatlas$plates[[102]]@summary@numPaths
[1] 110
EPSatlas$plate.info[[102]]$style %>% length()
[1] 102

This means that I cannot create a data.frame of the style for each one of the paths. Is this a bug? is there a reason some paths don't have the matching style?

get.image command not working

Hello,

When trying to batch process, the output of this code is incorrect. My folder has 47 tiff images.

animal<-'C:/Users/R/Desktop/PVcompressed'
> images<-get.images(animal)
> length(images)
[1] 1

Could you please let me know what to fix?

Thanks.

Cannot find gl.h

I am using easybuild 4.4.2 tryiung to install R-4.1.0
The issue is package with Xvfb-1.20.11-GCCcore-10.3.0.eb
The package fails on installing bundle component Xvfb v1.20.11 (9/9)
This is compiling xorg-server-1.20.11 which fails on build_log.py:169 ERROR EasyBuild crashed with an error (at easybuild/base/exceptions.py:124 in init): build failed (first 300 chars): cmd " make -j 2 V=1 SHA1_LIBS="$EBROOTNETTLE/lib*/libnettle.a" LIBUNWIND_LIBS="$EBROOTLIBUNWIND/lib*/libunwind.a $EBROOTXZ/lib*/liblzma.a"" exited with exit code 2 and output:
Making all in doc

easybuild-04rkw5zi.log

cd /home/rgg/.local/easybuild/build/Xvfb/1.20.11/GCCcore-10.3.0/xorg-server-1.20.11
and ran the command in the error log
. make -j 2 V=1 SHA1_LIBS="$EBROOTNETTLE/lib*/libnettle.a" LIBUNWIND_LIBS="$EBROOTLIBUNWIND/lib*/libunwind.a $EBROOTXZ/lib*/liblzma.a"

glxserver.h:49:10: fatal error: GL/gl.h: No such file or directory
#include <GL/gl.h>
^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:814: indirect_dispatch.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:814: indirect_dispatch_swap.lo] Error 1
make[1]: Leaving directory '/home/rgg/.local/easybuild/build/Xvfb/1.20.11/GCCcore-10.3.0/xorg-server-1.20.11/glx'
make: *** [Makefile:817: all-recursive] Error 1

quartz dependency, useless on linux

In the tutorial, you call quartz() followed by the registration() function. Within registration(), quartz() is called several times. You do have a conditional statement check for the Windows OS .Platform$OS.type=="windows", however there is no check for linux. The Quartz graphical layer is the macOS graphics model. It does not and can not be run on linux. There is no call to x11() in your code.

We are running the package on a linux machine and forwarding the graphics over SSH with X11, could this have any effect? We are able to get though the tutorial up until the registration step.

package or namespace load failed for 'wholebrain' in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object

Hi,
Thanks for you fantastic work! I had an issue while trying to install the wholebrain. I'm running on Windows 11 with R version 4.3.3 and Rtool43.

installing to C:/Users/heyeh/AppData/Local/R/win-library/4.3/00LOCK-wholebrain/00new/wholebrain/libs/x64
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'wholebrain' in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/Users/heyeh/AppData/Local/R/win-library/4.3/00LOCK-wholebrain/00new/wholebrain/libs/x64/wholebrain.dll':
  LoadLibrary failure:  The specified module could not be found.

Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Users/heyeh/AppData/Local/R/win-library/4.3/wholebrain'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/heyeh/AppData/Local/Temp/RtmpOeXyGh/file4b843a855984/wholebrain_0.1.1.tar.gz’ had non-zero exit status

Any ideas why?

Error in forward warp

Hi Daniel,

When running registration I get this error:

> dataset<-inspect.registration(regi, seg, forward.warps = TRUE)
Forward warps has not been not computed, have to compute that first!
 If you want to avoid this from happening either turn forward.warp==TRUE in registration() or sink the output of this object into the registration output, i.e.:
 regi<-plot.registration(regi,forward.warp=TRUE)
COMPUTING FORWARD WARPS... this might take some time
Getting anatomical assignment for segmented objectsError in registration$transformationgrid$mxF[index] : 
  subscript out of bounds

Again, apologies if this is a simple fix,

Thanks for your help.

can not finish install in Windows 10

Hello Sir,
Thank you very much for your work. I 'm very interested in implementing your project. I followed your instructions in the website, and it seems I have no problems until the last step to install wholebrain. Can you give some instructions? Thanks you very much!

devtools::install_github("tractatus/wholebrain", args='--no-multiarch')
Downloading GitHub repo tractatus/wholebrain@HEAD
√ checking for file 'C:\temp\RtmpaYD1DI\remotes3af851576f3e\tractatus-wholebrain-b9778a2/DESCRIPTION' (521ms)

  • preparing 'wholebrain': (10.2s)
    √ checking DESCRIPTION meta-information ...
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts (653ms)
  • checking for empty or unneeded directories (2.3s)
  • looking to see if a 'data/datalist' file should be added (403ms)
  • building 'wholebrain_0.1.1.tar.gz' (4.6s)
  • installing source package 'wholebrain' ...
    ** using staged installation
    ** libs

*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c CThinPlateSpline.cpp -o CThinPlateSpline.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c CoherentPointShift.cpp -o CoherentPointShift.o
CoherentPointShift.cpp: In function 'SEXPREC* CoherentPointDriftRegistration(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
CoherentPointShift.cpp:24:12: warning: unused variable 'beta' [-Wunused-variable]
double beta = Rcpp::as(betaR);
^
CoherentPointShift.cpp:25:12: warning: unused variable 'lambda' [-Wunused-variable]
double lambda = Rcpp::as(lambdaR);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c DoubleSlider.cpp -o DoubleSlider.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c ThinPlateSpline.cpp -o ThinPlateSpline.o
ThinPlateSpline.cpp: In function 'SEXPREC* ThinPlateRegistration(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
ThinPlateSpline.cpp:168:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned i=0; i < srX.size(); i++) {
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c Widget.cpp -o Widget.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c affine.cpp -o affine.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c connectedcomponents3D.cpp -o connectedcomponents3D.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c display.cpp -o display.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c filter.cpp -o filter.o
filter.cpp: In function 'void FindBlobs(const cv::Mat&, std::vector<std::vector<cv::Point_ > >&, int)':
filter.cpp:142:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(blob.size()>lengthlimitation){
^
filter.cpp: In function 'void stepwisethreshold(const cv::Mat&, std::vector, bool, double, double, std::vector<std::vector<cv::Point_ > >&, std::vector<cv::Vec<int, 4> >&, cv::Mat&)':
filter.cpp:317:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
filter.cpp: In member function 'void StepThreshold::runthreshold()':
filter.cpp:383:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int j=0; j<numThresholds; j++){
^
filter.cpp:388:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int i=0; i<numThresholds; i++) {
^
filter.cpp:452:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
filter.cpp:461:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
filter.cpp:476:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
filter.cpp: In function 'void copySourceTile(const cv::Mat&, cv::Mat&, cv::Rect&)':
filter.cpp:676:10: warning: variable 'tl' set but not used [-Wunused-but-set-variable]
auto tl = tile.tl();
^
filter.cpp: In function 'SEXPREC* getContours(SEXP, SEXP, SEXP)':
filter.cpp:928:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ )
^
filter.cpp: In function 'SEXPREC* filterImage(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
filter.cpp:1062:9: warning: unused variable 'oldRowW' [-Wunused-variable]
int oldRowW = rowsW;
^
filter.cpp:1065:10: warning: variable 'oldsize' set but not used [-Wunused-but-set-variable]
Size oldsize = tobefiltered.size();
^
filter.cpp:1002:7: warning: unused variable 'nofilter' [-Wunused-variable]
int nofilter = Rcpp::as(noFilter); //change to bool
^
filter.cpp:1003:7: warning: unused variable 'filterminArea' [-Wunused-variable]
int filterminArea = Rcpp::as(filter_minArea);
^
filter.cpp:1004:7: warning: unused variable 'filtermaxArea' [-Wunused-variable]
int filtermaxArea = Rcpp::as(filter_maxArea);
^
filter.cpp:1005:7: warning: unused variable 'filterminThresh' [-Wunused-variable]
int filterminThresh = Rcpp::as(filter_minThresh);
^
filter.cpp:1006:7: warning: unused variable 'filtermaxThresh' [-Wunused-variable]
int filtermaxThresh = Rcpp::as(filter_maxThresh);
^
filter.cpp:1007:7: warning: unused variable 'filtereccentricity' [-Wunused-variable]
int filtereccentricity = Rcpp::as(filter_eccentricity);
^
In file included from C:\R\R-3\library\opencv\include/opencv2/core.hpp:58:0,
from C:\R\R-3\library\opencv\include/opencv2/opencv.hpp:52,
from filter.cpp:2:
C:\R\R-3\library\opencv\include/opencv2/core/types.hpp: In function 'SEXPREC* createTiles(SEXP, SEXP, SEXP, SEXP, SEXP)':
C:\R\R-3\library\opencv\include/opencv2/core/types.hpp:1828:50: warning: 'y0' may be used uninitialized in this function [-Wmaybe-uninitialized]
: x(_x), y(_y), width(_width), height(_height) {}
^
filter.cpp:796:9: note: 'y0' was declared here
int y0;
^
In file included from C:\R\R-3\library\opencv\include/opencv2/core.hpp:58:0,
from C:\R\R-3\library\opencv\include/opencv2/opencv.hpp:52,
from filter.cpp:2:
C:\R\R-3\library\opencv\include/opencv2/core/types.hpp:1828:50: warning: 'x0' may be used uninitialized in this function [-Wmaybe-uninitialized]
: x(_x), y(_y), width(_width), height(_height) {}
^
filter.cpp:795:9: note: 'x0' was declared here
int x0;
^
filter.cpp:793:16: warning: 'newWidth' may be used uninitialized in this function [-Wmaybe-uninitialized]
finalImage = Mat::zeros(newHeight, newWidth, sourceImage.type());
^
filter.cpp:793:16: warning: 'newHeight' may be used uninitialized in this function [-Wmaybe-uninitialized]
filter.cpp: In function 'SEXPREC* interactiveThreshold(SEXP, SEXP)':
filter.cpp:605:55: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
pd.src.convertTo(srcFloat,CV_32F,255/(double)depth);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c flatfieldcorrection.cpp -o flatfieldcorrection.o
flatfieldcorrection.cpp: In function 'void getGain(int, int, int, std::vectorcv::Mat&, cv::Mat&, bool)':
flatfieldcorrection.cpp:64:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t s = 0; s != STACKS; ++s){
^
flatfieldcorrection.cpp:45:7: warning: unused variable 'i' [-Wunused-variable]
int i;
^
flatfieldcorrection.cpp: In function 'SEXPREC* posteriorFFC(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
flatfieldcorrection.cpp:170:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t s = 0; s != num_files; ++s){
^
flatfieldcorrection.cpp:108:7: warning: unused variable 'DISPLAY' [-Wunused-variable]
int DISPLAY = Rcpp::as(display);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c gauss_transform.cpp -o gauss_transform.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c gauss_transform_make_default.cpp -o gauss_transform_make_default.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c getContour.cpp -o getContour.o
getContour.cpp: In function 'SEXPREC* getContour(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
getContour.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i < contours.size(); i++ )
^
getContour.cpp:150:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i < contours.size(); i++ )
^
getContour.cpp:155:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ )
^
getContour.cpp:174:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ )
^
getContour.cpp:203:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
getContour.cpp:238:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < contours[it].size(); ++j){
^
getContour.cpp:251:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < contours[0].size(); ++j){
^
getContour.cpp: In function 'SEXPREC
nuclearSegment(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
getContour.cpp:694:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i< contours.size(); ++i){
^
getContour.cpp:695:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < contours[i].size(); ++j){
^
getContour.cpp:714:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i< contours.size(); ++i){
^
getContour.cpp:715:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < contours[i].size(); ++j){
^
getContour.cpp:363:7: warning: unused variable 'numNested' [-Wunused-variable]
int numNested = Rcpp::as(getNested);
^
getContour.cpp:728:5: warning: unused variable 'numOfSegments2' [-Wunused-variable]
int numOfSegments2 = contoursDist.size();
^
getContour.cpp:528:51: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
img.convertTo(dist_CV_8UC3,CV_8UC1,255.0/(depth)); //-255.0/Min
^
getContour.cpp: In function 'SEXPREC* getContour(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
getContour.cpp:123:59: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
threshold(img, img_bw, thresh, depth, CV_THRESH_BINARY);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c imageconverter.cpp -o imageconverter.o
imageconverter.cpp: In function 'SEXPREC* morphologyEx(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
imageconverter.cpp:179:7: warning: unused variable 'morph_elem' [-Wunused-variable]
int morph_elem = Rcpp::as(morphElem);// 0;
^
imageconverter.cpp:182:13: warning: unused variable 'max_operator' [-Wunused-variable]
int const max_operator = 4;
^
imageconverter.cpp:183:13: warning: unused variable 'max_elem' [-Wunused-variable]
int const max_elem = 2;
^
imageconverter.cpp:184:13: warning: unused variable 'max_kernel_size' [-Wunused-variable]
int const max_kernel_size = 21; //"Kernel size:\n 2n +1"
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c laplacianpyramidblending.cpp -o laplacianpyramidblending.o
laplacianpyramidblending.cpp: In member function 'void LaplacianBlending::buildGaussianPyramid()':
laplacianpyramidblending.cpp:42:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (leftLapPyr.size() > l) {
^
laplacianpyramidblending.cpp: In function 'void placeCenterTiles(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vectorcv::Mat&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:225:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t s = 0; s != STACKS; ++s){
^
laplacianpyramidblending.cpp: In function 'void placeHorizontalOverlap(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vectorcv::Mat&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:327:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t s = 0; s < STACKS; ++s){
^
laplacianpyramidblending.cpp: In function 'void placeVerticalOverlap(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vectorcv::Mat&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:419:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t s = 0; s < STACKS; ++s){
^
laplacianpyramidblending.cpp: In function 'void placeSmallOverlap(int, int, int, int, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::IntegerVector, std::vectorcv::Mat&, cv::Mat&, bool)':
laplacianpyramidblending.cpp:505:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(size_t s = 0; s < STACKS; ++s){
^
laplacianpyramidblending.cpp: In function 'SEXPREC* LaplacianBlendPipe(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
laplacianpyramidblending.cpp:559:7: warning: unused variable 'verticaltiles' [-Wunused-variable]
int verticaltiles = Rcpp::as(nrows);
^
laplacianpyramidblending.cpp:560:7: warning: unused variable 'horizontaltiles' [-Wunused-variable]
int horizontaltiles = Rcpp::as(ncols);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c lwtimagetest.cpp -o lwtimagetest.o
In file included from lift.h:34:0,
from lwave.h:35,
from lwtimagetest.cpp:18:
Laurent.h: In instantiation of 'Laurent::Laurent() [with T = double]':
lift.h:703:20: required from here
Laurent.h:45:6: warning: unused variable 'degree' [-Wunused-variable]
int degree=0;
^
Laurent.h:47:6: warning: unused variable 'highest' [-Wunused-variable]
int highest = 0;
^
In file included from lwtimagetest.cpp:18:0:
lwave.h: In constructor 'lwt2::lwt2(std::vector<_RealType>&, int, int, liftscheme&) [with T = double]':
lwave.h:372:7: warning: 'rows_ll' may be used uninitialized in this function [-Wmaybe-uninitialized]
int rows_ll,cols_ll,rows_lh,cols_lh;
^
lwave.h:372:23: warning: 'rows_lh' may be used uninitialized in this function [-Wmaybe-uninitialized]
int rows_ll,cols_ll,rows_lh,cols_lh;
^
lwave.h:399:23: warning: 'rows_hh' may be used uninitialized in this function [-Wmaybe-uninitialized]
int rows_hl,cols_hl,rows_hh,cols_hh;
^
lwave.h:399:7: warning: 'rows_hl' may be used uninitialized in this function [-Wmaybe-uninitialized]
int rows_hl,cols_hl,rows_hh,cols_hh;
^
In file included from lwave.h:36:0,
from lwtimagetest.cpp:18:
alg.h:78:3: warning: 'cols_H' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (int j=0; j < rows; j++) {
^
In file included from lwtimagetest.cpp:18:0:
lwave.h:351:28: note: 'cols_H' was declared here
int rows_L,cols_L,rows_H,cols_H;
^
In file included from lwave.h:36:0,
from lwtimagetest.cpp:18:
alg.h:78:3: warning: 'cols_L' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (int j=0; j < rows; j++) {
^
In file included from lwtimagetest.cpp:18:0:
lwave.h:351:14: note: 'cols_L' was declared here
int rows_L,cols_L,rows_H,cols_H;
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c makeAtlasNissl.cpp -o makeAtlasNissl.o
makeAtlasNissl.cpp: In function 'SEXPREC* getAtlasNissl(SEXP, SEXP)':
makeAtlasNissl.cpp:61:10: warning: unused variable 'resizeParam' [-Wunused-variable]
double resizeParam = (double)(7900/395);
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c manualsegmentation.cpp -o manualsegmentation.o
manualsegmentation.cpp: In member function 'void Segmentation::runthreshold()':
manualsegmentation.cpp:219:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i < brainContours.size(); i++ ){
^
manualsegmentation.cpp:225:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i < brainContours.size(); i++ )
^
manualsegmentation.cpp:236:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< brainContours.size(); i++ )
^
manualsegmentation.cpp:254:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< brainContours.size(); i++ ){
^
manualsegmentation.cpp:287:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int j=0; j<numThresholds; j++){
^
manualsegmentation.cpp:292:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int i=0; i<numThresholds; i++) {
^
manualsegmentation.cpp:356:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < contours[k].size(); ++j){
^
manualsegmentation.cpp:388:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
manualsegmentation.cpp:401:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
manualsegmentation.cpp:417:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0; i< contours.size(); i++ ){
^
manualsegmentation.cpp: In function 'SEXPREC* imageshow(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
manualsegmentation.cpp:848:7: warning: variable 'depth' set but not used [-Wunused-but-set-variable]
int depth;
^
manualsegmentation.cpp: In function 'SEXPREC* GUI(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
manualsegmentation.cpp:1189:24: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if(channelOfInterest != 0 & pd.src.type()!=16 ){
^
manualsegmentation.cpp:1281:55: warning: 'depth' may be used uninitialized in this function [-Wmaybe-uninitialized]
pd.src.convertTo(srcFloat,CV_32F,255/(double)depth);
^
manualsegmentation.cpp: In function 'SEXPREC* imageshow(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
manualsegmentation.cpp:909:50: warning: array subscript is above array bounds [-Warray-bounds]
intensitySliderImage.maxValue = rangeValues[6];
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c matrix.cpp -o matrix.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c multiresolutiondecomposition.cpp -o multiresolutiondecomposition.o
multiresolutiondecomposition.cpp: In function 'SEXPREC* multiresolutiondecomposition(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
multiresolutiondecomposition.cpp:165:9: warning: unused variable 'oldRowW' [-Wunused-variable]
int oldRowW = rowsW;
^
multiresolutiondecomposition.cpp:168:10: warning: variable 'oldsize' set but not used [-Wunused-but-set-variable]
Size oldsize = tobefiltered.size();
^
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c nonrigid.cpp -o nonrigid.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c normalization.cpp -o normalization.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c rigid.cpp -o rigid.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c transform.cpp -o transform.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c utils.cpp -o utils.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c wavelet2d.cpp -o wavelet2d.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R/R-3/include" -DNDEBUG -I"C:\R\R-3\library\opencv\include\opencv2" -I"C:\R\R-3\library\opencv\include" -I"C:\R\R-3\library\opencv\x86\mingw\bin" -I"C:\fftw/" -I../inst/include -I"C:/R/R-3/library/Rcpp/include" -IC:/R/R-3/library/Rcpp/include -O2 -Wall -mtune=core2 -c webfiles.cpp -o webfiles.o
webfiles.cpp: In function 'void copySrcTile(const cv::Mat&, cv::Mat&, cv::Rect&)':
webfiles.cpp:19:10: warning: variable 'tl' set but not used [-Wunused-but-set-variable]
auto tl = tile.tl();
^
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o wholebrain.dll tmp.def CThinPlateSpline.o CoherentPointShift.o DoubleSlider.o ThinPlateSpline.o Widget.o affine.o connectedcomponents3D.o display.o filter.o flatfieldcorrection.o gauss_transform.o gauss_transform_make_default.o getContour.o imageconverter.o laplacianpyramidblending.o lwtimagetest.o makeAtlasNissl.o manualsegmentation.o matrix.o multiresolutiondecomposition.o nonrigid.o normalization.o rigid.o transform.o utils.o wavelet2d.o webfiles.o -LC:\R\R-3\library\opencv\x86\mingw\lib -lopencv_calib3d451 -lopencv_core451 -lopencv_features2d451 -lopencv_flann451 -lopencv_highgui451 -lopencv_imgcodecs451 -lopencv_imgproc451 -lopencv_ml451 -lopencv_objdetect451 -lopencv_photo451 -lopencv_stitching451 -lopencv_video451 -lopencv_videoio451 -LC:\fftw/ -lfftw3-3 -L..inst/include/x64 -LC:/R/R-3/bin/i386 -lR
C:\fftw//libfftw3-3.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'wholebrain'

  • removing 'C:/R/R-3/library/wholebrain'
    Warning messages:
    1: In i.p(...) :
    installation of package ‘C:/temp/RtmpaYD1DI/file3af86cb57f42/wholebrain_0.1.1.tar.gz’ had non-zero exit status
    2: 1 components of ... were not used.

We detected these problematic arguments:

  • args

Did you misspecify an argument?

windows 10 install

Hi Daniel,

Thanks for all your hard work on developing wholebrain!
I'm coming across and issue where opencv is not being installed correctly during the first stage of the wholebrain install. So of course I cannot then add opencv to system path bc it is not there.
Thanks in advance for any insight you could provide on this!

devtools::install_github("tractatus/wholebrain", args="--no-multiarch")
Downloading GitHub repo tractatus/wholebrain@master
Downloading GitHub repo swarm-lab/ROpenCVLite@master
√ checking for file 'C:\Users\GourleyLab\AppData\Local\Temp\RtmpoN6G8o\remotesce83a607ca2\swarm-lab-ROpenCVLite-3a5ef7f/DESCRIPTION' (631ms)

  • preparing 'ROpenCVLite': (355ms)
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Removed empty directory 'ROpenCVLite/man/figures'
  • building 'ROpenCVLite_0.3.410.tar.gz'
    Warning: file 'ROpenCVLite/configure' did not have execute permissions: corrected

Installing package into ‘C:/Users/GourleyLab/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)

  • installing source package 'ROpenCVLite' ...
  • set -e
  • hash cmake
  • exit 0
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    converting help for package 'ROpenCVLite'
    finding HTML links ... done
    ROpenCVLite-package html
    installOpenCV html
    isOpenCVInstalled html
    opencvConfig html
    opencvVersion html
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    Warning in installOpenCV() :
    OpenCV can only be installed in interactive mode.
    OpenCV was not installed at this time. You can install it at any time by using the installOpenCV() function in interactive mode.
  • DONE (ROpenCVLite)
    In R CMD INSTALL
    Installing 14 packages: png, grImport, sp, rgl, misc3d, XML, knitr, manipulateWidget, highr, markdown, xfun, miniUI, base64enc, webshot
    Installing packages into ‘C:/Users/GourleyLab/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)
    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/png_0.1-7.zip'
    Content type 'application/zip' length 292639 bytes (285 KB)
    downloaded 285 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/grImport_0.9-2.zip'
Content type 'application/zip' length 825059 bytes (805 KB)
downloaded 805 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/sp_1.3-1.zip'
Content type 'application/zip' length 1868805 bytes (1.8 MB)
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rgl_0.100.30.zip'
Content type 'application/zip' length 4242560 bytes (4.0 MB)
downloaded 4.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/misc3d_0.8-4.zip'
Content type 'application/zip' length 237276 bytes (231 KB)
downloaded 231 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/XML_3.98-1.20.zip'
Content type 'application/zip' length 4601568 bytes (4.4 MB)
downloaded 4.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/knitr_1.25.zip'
Content type 'application/zip' length 1418726 bytes (1.4 MB)
downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/manipulateWidget_0.10.0.zip'
Content type 'application/zip' length 1858300 bytes (1.8 MB)
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/highr_0.8.zip'
Content type 'application/zip' length 48182 bytes (47 KB)
downloaded 47 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/markdown_1.1.zip'
Content type 'application/zip' length 189550 bytes (185 KB)
downloaded 185 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/xfun_0.10.zip'
Content type 'application/zip' length 178361 bytes (174 KB)
downloaded 174 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/miniUI_0.1.1.1.zip'
Content type 'application/zip' length 36168 bytes (35 KB)
downloaded 35 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/base64enc_0.1-3.zip'
Content type 'application/zip' length 43316 bytes (42 KB)
downloaded 42 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/webshot_0.5.1.zip'
Content type 'application/zip' length 140937 bytes (137 KB)
downloaded 137 KB

package ‘png’ successfully unpacked and MD5 sums checked
package ‘grImport’ successfully unpacked and MD5 sums checked
package ‘sp’ successfully unpacked and MD5 sums checked
package ‘rgl’ successfully unpacked and MD5 sums checked
package ‘misc3d’ successfully unpacked and MD5 sums checked
package ‘XML’ successfully unpacked and MD5 sums checked
package ‘knitr’ successfully unpacked and MD5 sums checked
package ‘manipulateWidget’ successfully unpacked and MD5 sums checked
package ‘highr’ successfully unpacked and MD5 sums checked
package ‘markdown’ successfully unpacked and MD5 sums checked
package ‘xfun’ successfully unpacked and MD5 sums checked
package ‘miniUI’ successfully unpacked and MD5 sums checked
package ‘base64enc’ successfully unpacked and MD5 sums checked
package ‘webshot’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\GourleyLab\AppData\Local\Temp\RtmpoN6G8o\downloaded_packages
Skipping install of 'ROpenCVLite' from a github remote, the SHA1 (3a5ef7f9) has not changed since last install.
Use force = TRUE to force installation
√ checking for file 'C:\Users\GourleyLab\AppData\Local\Temp\RtmpoN6G8o\remotesce829747816\tractatus-wholebrain-8e12757/DESCRIPTION' (447ms)

  • preparing 'wholebrain': (2.1s)
    √ checking DESCRIPTION meta-information ...
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories (1s)
  • looking to see if a 'data/datalist' file should be added
  • building 'wholebrain_0.1.1.tar.gz' (2.5s)

Installing package into ‘C:/Users/GourleyLab/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)

  • installing source package 'wholebrain' ...
    ** libs
    Error in ROpenCVLite::opencvConfig("cflags", arch = Sys.getenv("R_ARCH")) :
    OpenCV is not installed on this system. Please use installOpenCV() to install it.
    Execution halted
    c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.5.1/include" -DNDEBUG -I"C:\fftw/" -I../inst/include -I"C:/Users/GourleyLab/Documents/R/win-library/3.5/Rcpp/include" -IC:/Users/GourleyLab/Documents/R/win-library/3.5/Rcpp/include -O2 -Wall -mtune=generic -c CThinPlateSpline.cpp -o CThinPlateSpline.o
    CThinPlateSpline.cpp:9:30: fatal error: opencv2/opencv.hpp: No such file or directory
    #include "opencv2/opencv.hpp"
    ^
    compilation terminated.
    make: *** [CThinPlateSpline.o] Error 1
    ERROR: compilation failed for package 'wholebrain'
  • removing 'C:/Users/GourleyLab/Documents/R/win-library/3.5/wholebrain'
    In R CMD INSTALL
    Error: Failed to install 'wholebrain' from GitHub:
    (converted from warning) installation of package ‘C:/Users/GourleyLab/AppData/Local/Temp/RtmpoN6G8o/filece87d08793a/wholebrain_0.1.1.tar.gz’ had non-zero exit status

Can't install in PC

Sorry, this is the error I get at the last step of the installlation:

Error: (converted from warning) running command '"C:/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\R-3.4.4\library" "C:/Users/MBF/AppData/Local/Temp/RtmpKUquxB/file17f83ff276c/wholebrain_0.1.1.tar.gz"' had status 1

Clipping with CV_16U to CV_16S conversion

Hi Daniel!

Thank you for the great program! I am having major issues with segmentation as the higher intensities are getting clipped. Since my images are CV_16U, they get converted to CV_16S, but the higher values are clipped instead of getting shrunk. On the left is the image from imshow() and on the right from window explorer. The contrast only starts changing when I go below 32768.

image (1)

Here is the output in the console:
image (2)

I think there might be a bug with the CV_16U conversion. I tried re-saving my image using raster, and manged to regain the dynamic range to 65536, but the file format changed to CV_32F_5. The code is as follows:

{
  library(raster)
  library(rgdal)
  tictoc::tic("Time Taken")
  r_im <- raster(test_im)
  writeRaster(r_im, conv, format="GTiff", overwrite=T)
  tictoc::toc(log=TRUE)
}

Is there a way to fix this bug or do I have to re-save all my images using raster? Re-conversion via raster is quite inefficient, and I am not sure if there would be any downstream issues, hence I am pretty reluctant to use it.

Best Regards,
Gao Xiang Ham

Installation Problem Linux/Ubuntu

Hello, I am having a problem installing wholebrain in Ubuntu. When running the line "devtools::install_github("tractatus/wholebrain")" I keep receiving an error in the terminal window "Error in ROpenCVLite::opencvConfig("cflags") : OpenCV is not installed on this system. Please use installOpenCV() to install it. Execution halted". I have opencv version 3.2.0. I am unsure if it is because I installed it differently then your installation guide says. I followed this: "https://stackoverflow.com/questions/45582565/opencv-cmake-error-no-such-file-or-directory-on-ubuntu" by user Kallz. I installed the package in R as well. Thank you for your help.

Anterior sagittal plates unexpected behavior

At bregma 4.9 the atlas shows a couple of blobs:

image

but at bregmas even more anterior, like bregma 5.2, there are areas labelled:

image

And bregma 4.85 for reference:

image

Might this be related to the other issue raised, Sagittal plate 3 is missing or inaccessible #6?

undefined symbol: _ZN2cv11imreadmulti

** testing if installed package can be loaded
Error: package or namespace load failed for ‘wholebrain’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/wholebrain/libs/wholebrain.so':
/usr/local/lib/R/site-library/wholebrain/libs/wholebrain.so: undefined symbol: _ZN2cv11imreadmultiERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorINS_3MatESaIS9_EEi
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/usr/local/lib/R/site-library/wholebrain’
    Error in i.p(...) :
    (converted from warning) installation of package ‘/tmp/RtmpKwz7AJ/file4334d9e74bc/wholebrain_0.1.1.tar.gz’ had non-zero exit status

its impossible to install wholebrain on ubuntu 18, and windows 7.
also its not possible to get wholebrain working in a new user account on a win7 pc where wholebrain already installed and working......

Apply registration to image where cells already segmented

I would like to apply the image registration to brain images in which we have independently identified the cells. We have the coordinates of each cell stored in tabular format, and if we could add a column that described the anatomical region in which it is located, that would be fantastic.

Is this possible?

OpenCV CMake issue on Win10

Hi, I have followed the installation instruction and met a problem after I finished generating in CMake-GUI. I got configuration and generating done, and got information in CMake console as below. But there is no executive makefile mingw32-make in C:/opencv/release. All newly generated files after CMake are:
image
image

So I wonder what the problem may be?

Thank you so much!

Detected processor: AMD64
Dispatch optimization AVX512_SKX is not available, skipped
libjpeg-turbo: VERSION = 2.0.2, BUILD = opencv-4.1.1-libjpeg-turbo
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES) 
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: C:/opencv/release/python_loader
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx512_skx.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx512_skx.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin512.avx512_skx.cpp


Excluding from source files list: modules/imgproc/src/sumpixels.avx512_skx.cpp
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/opencv/sources/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 

General configuration for OpenCV 4.1.1 =====================================
  Version control:               unknown

  Platform:
    Timestamp:                   2019-10-27T22:06:02Z
    Host:                        Windows 10.0.18363 AMD64
    CMake:                       3.17.2
    CMake generator:             MinGW Makefiles
    CMake build tool:            C:/Rtools/mingw_64/bin/mingw32-make.exe
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (15 files):         + SSSE3 SSE4_1
      SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (29 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                C:/Rtools/mingw_64/bin/g++.exe  (ver 4.9.3)
    C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  C:/Rtools/mingw_64/bin/gcc.exe
    C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-comment -Wno-missing-field-initializers -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--gc-sections  
    Linker flags (Debug):        -Wl,--gc-sections  
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java js python2 python3
    Applications:                tests perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  Windows RT support:            NO

  GUI: 
    Win32 UI:                    YES
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.11)
    JPEG:                        build-libjpeg-turbo (ver 2.0.2-62)
    WEBP:                        build (ver encoder: 0x020e)
    PNG:                         build (ver 1.6.37)
    TIFF:                        build (ver 42 - 4.0.10)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (58.35.100)
      avformat:                  YES (58.20.100)
      avutil:                    YES (56.22.100)
      swscale:                   YES (5.3.100)
      avresample:                YES (4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES

  Parallel framework:            none

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  OpenCL:                        YES (no extra features)
    Include path:                C:/opencv/sources/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            C:/ProgramData/Anaconda3/python.exe

  Java:                          
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    C:/opencv/release/install
-----------------------------------------------------------------

Configuring done
Generating done

Brain image flipped when saving registration

Upon viewing registration with inspect.registration() everything is in order, the atlas matches with the brain image and the active neurons seems to labeled correctly. When saving this with dev.copy(), the brain image becomes flipped. Everything else remains in order.

inspect.registration(regi, seg)
image

dev.copy(pdf, paste0("~/Desktop/registrations/", tools::file_path_sans_ext(basename(images[i])), '.pdf')) look closely for the flipped brain image
image

something about the install

image
as the image,when i floow the steps,but there is no " CMAKE_MAKE_PROGRAM" key ,i do not how to do it ,Could you help me?

opencv was built in newer version than linked

Hi everyone and Daniel @tractatus, I am having a trouble when installing wholebrain, the error seems from opencv which is built for macOS 10.15 but was linked to macOS 10.13. I installed opencv using ROpenCVLite::installOpenCV().

The errors showed during installing wholebrain:
/bin/sh: pkg-config: command not found
ld: warning: dylib (/Library/Frameworks/R.framework/Versions/4.0/Resources/library/opencv/lib/libopencv_calib3d.dylib) was built for newer macOS version (10.15) than being linked (10.13)

Thanks so much!
Best,
Shuai

Trouble installing

Hi Daniel, I really appreciate your efforts to make wholebrain as open source and accessible as possible. Thank you! I followed your tutorial to install on Windows, but on one of the final steps I run into an issue. In Rstudio I call the following to install your package from GitHub:

devtools::install_github("tractatus/wholebrain", args='--no-multiarch')

This generate the following message in which there is an error:

The downloaded binary packages are in
	C:\Users\tyler\AppData\Local\Temp\RtmpIl0P90\downloaded_packages
Downloading GitHub repo swarm-lab/ROpenCVLite@master
√  checking for file 'C:\Users\tyler\AppData\Local\Temp\RtmpIl0P90\remotes4da41f491205\swarm-lab-ROpenCVLite-e0dbc33/DESCRIPTION' ... 
-  preparing 'ROpenCVLite':
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
   Removed empty directory 'ROpenCVLite/man/figures'
-  building 'ROpenCVLite_0.2.40.1.tar.gz'
   Warning: file 'ROpenCVLite/cleanup' did not have execute permissions: corrected
   Warning: file 'ROpenCVLite/configure' did not have execute permissions: corrected
   
* installing *source* package 'ROpenCVLite' ...
+ set -e
+ cd ./src
+ D:/R-3.5.1/bin/Rscript.exe -e 'download.file('\''https://github.com/opencv/opencv/archive/4.0.1.tar.gz'\'', '\''opencv-4.0.1.tar.gz'\'')'
trying URL 'https://github.com/opencv/opencv/archive/4.0.1.tar.gz'
Content type 'application/x-gzip' length 87593916 bytes (83.5 MB)
==================================================
downloaded 83.5 MB

+ tar zxvf opencv-4.0.1.tar.gz
+ cp ../inst/cap_dshow.cpp opencv-4.0.1/modules/videoio/src/
+ cp ../inst/cap_dshow.hpp opencv-4.0.1/modules/videoio/src/
+ cd opencv-4.0.1
+ '[' '!' -d ../../inst/opencv ']'
+ mkdir ../../inst/opencv
+ '[' -d D:/R-3.5.1/bin/x64 ']'
+ ARCH=64
+ '[' '!' -d build64 ']'
+ mkdir build64
+ cd build64
+ cmake -G 'Unix Makefiles' -DCMAKE_C_COMPILER=C:/Rtools/mingw_64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/Rtools/mingw_64/bin/g++.exe -DCMAKE_RC_COMPILER=C:/Rtools/mingw_64/bin/windres.exe -DCMAKE_MAKE_PROGRAM=C:/Rtools/bin/make.exe -DENABLE_PRECOMPILED_HEADERS=OFF -DENABLE_CXX11=ON -DBUILD_ZLIB=ON -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DBUILD_matlab=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_MSMF=OFF -DBUILD_PROTOBUF=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=../../../inst/opencv/ ../
-- The CXX compiler identification is GNU 4.9.3
-- The C compiler identification is GNU 4.9.3
-- Check for working CXX compiler: C:/Rtools/mingw_64/bin/g++.exe
-- Check for working CXX compiler: C:/Rtools/mingw_64/bin/g++.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.8/Modules/CMakeTestCXXCompiler.cmake:44 (message):
  The C++ compiler "C:/Rtools/mingw_64/bin/g++.exe" is not able to compile a
  simple test program.

  It fails with the following output:

   Change Dir: C:/Users/tyler/AppData/Local/Temp/RtmpMB5Jjo/R.INSTALL520c2fa01373/ROpenCVLite/src/opencv-4.0.1/build64/CMakeFiles/CMakeTmp

   Run Build Command:"C:/Rtools/bin/make.exe" "cmTC_1391c/fast"

  /Rtools/bin/make -f CMakeFiles/cmTC_1391c.dir/build.make
  CMakeFiles/cmTC_1391c.dir/build

  make: /bin/sh: Command not found

  make: *** [Makefile:126: cmTC_1391c/fast] Error 127

    CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:131 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Users/tyler/AppData/Local/Temp/RtmpMB5Jjo/R.INSTALL520c2fa01373/ROpenCVLite/src/opencv-4.0.1/build64/CMakeFiles/CMakeOutput.log".
See also "C:/Users/tyler/AppData/Local/Temp/RtmpMB5Jjo/R.INSTALL520c2fa01373/ROpenCVLite/src/opencv-4.0.1/build64/CMakeFiles/CMakeError.log".
ERROR: configuration failed for package 'ROpenCVLite'
* removing 'D:/R-3.5.1/library/ROpenCVLite'
In R CMD INSTALL
Error in i.p(...) : 
  (converted from warning) installation of package ‘C:/Users/tyler/AppData/Local/Temp/RtmpIl0P90/file4da44b633341/ROpenCVLite_0.2.40.1.tar.gz’ had non-zero exit status

I'm hoping your experienced eye can catch the underlying problem. I hope I have provided enough information, but I can provide more info if necessary.

Thanks, Tyler

InterpImg class

Both ThinPlateSPline.cpp and CoherentPointDrift.cpp should contain reference to imwrite class for interpolation from mx and my.

This should be made into its own class possibly called InterpImg()

	Mat displayoutput;
	Mat img8bit;
	Mat displayoutputDST;
	Mat img8bitDST;
	double min, max;
	if(Max>0){
		min = Min;
		max = Max;
	}else{
		minMaxLoc(img, &min, &max);
	}
	img.convertTo(img8bit,CV_8UC1,255.0/(max-min) );
	normalize(img8bit, displayoutput, 0, 255, NORM_MINMAX, CV_8UC1);
	dst.convertTo(img8bitDST,CV_8UC1,255.0/(max-min) );
	normalize(img8bitDST, displayoutputDST, 0, 255, NORM_MINMAX, CV_8UC1);

	string filepath;
    filepath = off + "_undistorted.png";

	imwrite(filepath,displayoutput);
	filepath = off + "_distorted.png";

	imwrite(filepath,displayoutputDST);
	filepath = off + "_undistorted.tif";
    imwrite(filepath,img);
    filepath = off + "_distorted.tif";
	imwrite(filepath,dst);

An error occurs during installation with R console.

I really appreciate your efforts to make wholebrain as open-source.
I followed your tutorial to install on Mac but I get the following error and WholeBrain from R does not complete.
I hope the issue is resolved and can use the software. Thank you.

I am running in the following environment.
MacBook Pro (13-inch, M1, 2020)
macOS 11,6
R R version 4.1.1 (2021-08-10) -- "Kick Things" Platform: aarch64-apple-darwin20 (64-bit)
Xcode 12.5.1 (12E507)
XQuartz 2.8.1 (xorg-server 1.20.11)
OpenCV 3.2
fftw 3.3.9_1

The status when the code is entered into the R Commander according to the installation instructions is as follows.

if (!require(devtools)) {

  • install.packages("devtools")
  • }
    Loading required package: devtools
    Loading required package: usethis

devtools::install_github("tractatus/wholebrain")
Downloading GitHub repo tractatus/wholebrain@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: xfun (0.25 -> 0.26) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3
✔ checking for file ‘/private/var/folders/yw/5mbb8y0j5flb5rhr6jfrzt400000gn/T/Rtmp9X885m/remotes74965b363691/tractatus-wholebrain-1cc9634/DESCRIPTION’ ...
─ cleaning srcCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ looking to see if a ‘data/datalist’ file should be addedd shell scripts
─ building ‘wholebrain_0.1.1.tar.gz’ (1.9s)
building ‘wholebrain_0.1.1.tar.gz’ (1.9s)
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG pkg-config --cflags fftw3 Rscript -e 'ROpenCVLite::opencvConfig("cflags")' -I'/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include Rscript -e 'Rcpp:::CxxFlags()' -I../inst/include "-std=c++11" -fPIC -falign-functions=64 -Wall -g -O2 -c CThinPlateSpline.cpp -o CThinPlateSpline.o
Warning message:
In i.p(...) :
installation of package ‘/var/folders/yw/5mbb8y0j5flb5rhr6jfrzt400000gn/T//Rtmp9X885m/file7496794df4de/wholebrain_0.1.1.tar.gz’ had non-zero exit status

library(wholebrain)
Error in library(wholebrain) : there is no package called ‘wholebrain’
filename<-system.file('sample_tiles/rabiesEGFP.tif', package='wholebrain')
output<-segment(filename)
Error in segment(filename) : could not find function "segment"

installing in windows 10

Hello,

Sorry for the multiple messages, but running into this error again using the install command on Wholebrainsoftware.org
How do I resolve this error?
Thanks!

C:/WHOLEB~1/Rtools/mingw_32/bin/g++`` -shared -s -static-libgcc -o wholebrain.dll tmp.def CThinPlateSpline.o CoherentPointShift.o DoubleSlider.o ThinPlateSpline.o Widget.o affine.o connectedcomponents3D.o display.o filter.o flatfieldcorrection.o gauss_transform.o gauss_transform_make_default.o getContour.o imageconverter.o laplacianpyramidblending.o lwtimagetest.o makeAtlasNissl.o manualsegmentation.o matrix.o multiresolutiondecomposition.o nonrigid.o normalization.o rigid.o transform.o utils.o wavelet2d.o webfiles.o -LC:\WHOLEB~1\R\R-36~1.1\library\opencv\x86\mingw\lib -lopencv_calib3d410 -lopencv_core410 -lopencv_features2d410 -lopencv_flann410 -lopencv_gapi410 -lopencv_highgui410 -lopencv_imgcodecs410 -lopencv_imgproc410 -lopencv_ml410 -lopencv_objdetect410 -lopencv_photo410 -lopencv_stitching410 -lopencv_video410 -lopencv_videoio410 -LC:\fftw/ -lfftw3-3 -L..inst/include/x64 -LC:/WHOLEB~1/R/R-36~1.1/bin/i386 -lR

C:\fftw//libfftw3-3.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'wholebrain'
* removing 'C:/WholeBrain/R/R-3.6.1/library/wholebrain'
Error: Failed to install 'wholebrain' from GitHub:
  (converted from warning) installation of package ‘C:/Users/Mustafa/AppData/Local/Temp/RtmpWusMPR/file52901d106a7b/wholebrain_0.1.1.tar.gz’ had non-zero exit status
Error: 1 components of `...` were not used.

We detected these problematic arguments:
* `args`

Did you misspecify an argument?
Call `rlang::last_error()` to see a backtrace

A bug in getIntersection()

in the correspondance.R
when calling getIntersection(), it returns c(x1,y1)) or c(x1,y1,x2,y2)).
but it reports a warning in getIntersectwithContour() when getIntersection() returns c(x1,y1,x2,y2)).

in some situations, with too many this kind of warnings, the outline-> x*T may can not be calculated.

you get a result like this:
Screenshot from 2021-11-11 20-47-01

is there any tips to solve this bug?
a temporary way is c(mean(x1,y1),mean(x2,y2))), but I think it may not a theoretical way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.