GithubHelp home page GithubHelp logo

brainsia / brainstools Goto Github PK

View Code? Open in Web Editor NEW
108.0 18.0 97.0 28.84 MB

A suite of tools for medical image processing focused on brain analysis

Home Page: http://brainsia.github.io/BRAINSTools/

License: Apache License 2.0

Python 17.89% MATLAB 1.28% Shell 1.25% CMake 9.87% C++ 64.04% C 0.48% Tcl 0.01% Makefile 0.02% TeX 1.81% Jupyter Notebook 3.33% Batchfile 0.01%
brain registration image processing cmake namic c-plus-plus classification classifications segmentation

brainstools's Introduction

The BRAINSTools is a harness to assist in building the many of the BRAINSTools under development.

Developers should run the ./Utilities/SetupForDevelopment.sh script to get started.

If developing on Mac OS X, make sure the xcode command line tools are installed with the command: xcode-select --install

For more information on the individual BRAINSTools, please see the following link: https://github.com/BRAINSia/BRAINSTools/wiki

Building

Linux-based system follows basically similar instruction.

clone https://github.com/BRAINSia/BRAINSTools.git
mkdir BRAINSTools_build
cd BRAINSTools_build
ccmake ../BRAINSTools
make #make -j4 or make -j8 depending on the available cores

OS dependent instruction is given for any dependencies or other issues. Please report any issue you found so that we could update the instruction accordingly.

We also recommend to check out NAMICExternalProjects, https://github.com/BRAINSia/NAMICExternalProjects, which provides a set of tools, including ANTs Package, Slicer Modules, and our own BRAINSTools.

Mac OSX

Building BRAINSTools on mac is the same as any standard out of source cmake build. Make a folder for the BRAINSTools project. Clone the BRAINSTools repository, and run the set-up script. Make a build directory contained in the same folder as the git repository. From the build directory, run cmake (or ccmake to manually configure the build settings) with the BRAINSTools repo as an argument, then run make. For Example:

mkdir brains
cd brains
git clone http://github.com/BRAINSIa/BRAINSTools.git

cd BRAINSTools
./Utilities/SetupForDevelopment.sh
cd ..

mkdir build
cd build
cmake ../BRAINSTools

## NOTE: To configure options in the cmake GUI, use:
##     ccmake ../BRAINSTools
## instead
make -j${NUMOFTHREADS} -k

## NOTE: To find the number of threads from the OSX terminal, use:
##    sysctl -n hw.ncpu

Linux RedHat 6

Example session for a clean build:

mkdir ~/src/mytester
cd ~/src/mytester
git clone https://github.com/BRAINSia/BRAINSTools.git

cd BRAINSTools/
bash ./Utilities/SetupForDevelopment.sh

mkdir -p ../BRAINSTools-build
cd ../BRAINSTools-build/
CC=/usr/bin/gcc-4.2 CXX=/usr/bin/g++-4.2 ccmake ../BRAINSTools \
    -DUSE_BRAINSConstellationDetector:BOOL=ON \
    -DUSE_BRAINSABC:BOOL=ON

make -j${NUMOFTHREADS} -k

## NOTE: The fetching of data still has problems with parallel builds, so we need to restart it at least
#        once
make

Linux Debian (Ubuntu)

Building BRAINSTools on a fresh install has the additional dependency of building CMake on your system. You cannot use the version from apt-get as that does some unnatural things with Python resources to be backwards compatible (see http://public.kitware.com/Bug/view.php?id=14156).

  1. Install the necessary dependencies:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git python2.7
python2.7-dev g++ freeglut3-dev
  1. Get the CMake binaries:
# You can find the URL of the latest CMake binary by
# * Go to www.cmake.org/download in a browser
# * Hover over the desired 'Binary distribution' for your operating
#     system
# * Right-click and select 'Copy Link Address' for the file ending in
#     "tar.gz"
URL=http://www.cmake.org/files/v3.2/cmake-3.2.1-Linux-x86_64.tar.gz
wget ${URL}
# Decompress the file
tar -xzvf cmake-3.2.1-Linux-x86_64.tar.gz
# Add the binary to your PATH environment variable
export PATH=${PWD}/cmake-3.2.1-Linux-x86_64/bin:${PATH}
  1. Clone the repository and build:
git clone https://github.com/BRAINSia/BRAINSTools.git
mkdir build
cd build
CC=/usr/bin/gcc-4.8 \
CXX=/usr/bin/g++-4.8 \
cmake ../BRAINSTools \
make -j${NUMOFTHREADS} -k

⚠️ You can find the number of threads on your system in Ubuntu with lscpu

Testing

BRAINSTools_MAX_TEST_LEVEL adjusts how agressive the test suite is so that long running tests or incomplete tests can easily be silenced

1 - Run the absolute minimum very fast tests (These should always pass before any code commit)
3 - Run fast tests on continous builds (These need immediate attention if they begin to fail)
5 - Run moderate nightly tests (These need immediate attention if they begin to fail)
7 - Run long running extensive test that are a burden to normal development (perhaps test 1x per week)
8 - Run tests that fail due to incomplete test building, these are good ideas for test that we don't have time to make robust)
9 - Run silly tests that don't have much untility
set(BRAINSTools_MAX_TEST_LEVEL 3 CACHE STRING "Testing level for managing test burden")

The codebase should conform to clang-format defined standards that are similar to ITK's defintion.

git filter-branch -f --tree-filter \
   "~/Dashboard/src/ITK/Utilities/Maintenance/clang-format.bash --clang-format ~/local/clang-format-8.0.0-macosx  --tracked"  HEAD..

brainstools's People

Contributors

abpwrs avatar aghayoor avatar ajjl avatar chrisgorgo avatar cpinter avatar fbudin69500 avatar fedorov avatar finetjul avatar hjmjohnson avatar hui-xie avatar ihnorton avatar ipektest avatar jcfr avatar jessicaforbes avatar josephsnyder avatar juanprietob avatar karenpease avatar kian-weimer avatar langstraat avatar lassoan avatar lwen avatar matsuij avatar msmolens avatar phcerdan avatar pieper avatar pipitone avatar reginakim avatar sjh26 avatar tomwright01 avatar vovythevov avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brainstools's Issues

DWIConvert: FSLtoNrrd mode inputVolume in GUI

FSLToNrrd does not seem to be supported from the GUI, because it requires a CLI image type of "diffusion-weighted" (which no nifti loaded into Slicer can ever be, as far as I know). Perhaps changing the restriction to require a multi-volume scalar image would work with a 4d nifti volume loaded into. Alternatively, it would be useful to provide an input file-selector option under the FSLToNrrd parameters, so that the path can be selected... If neither is feasible, perhaps consider disabling the FSLToNrrd option in the GUI-generation XML.

ConvertBetweenFileFormats / DWIConvert: nrrd to nii -> Images squashed

Hi,
I'm using ConvertBetweenFileFormats to convert T1-weighted scans/brain masks from nrrd to nii. However, after installing the latest version of BRAINSTools a strange resampling happens when I convert to nii: The brain in squashed in one of the directions (L-R or S-I) (One plane looks normal). I also tried to use DWIConvert, but the same thing happens. With the older version of BRAINSTools (installed about 9 months ago) I did not have this issue. Does anyone have any ideas as to what could be going on?

Thanks,
Gabriëlla

Add exception handling instead of return value checks on DCMTK GetElement* calls

It turns out, DCMTK GetElement* do not return non-success value on failure. Instead they throw exceptions: eg see Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx:939.

As a result, failure to find a certain element in the input DICOM series leads to failure of the DWIConvert tool.

This can be fixed by adding try {} catch (...) {} around the calls. I did this for my use case, and it fixed the problem.

DWIConvert incorrectly handles multiple b-values for FSLtoNrrd

when using FSLtoNRRD with a multiple b-value DWI, then DWIConvert sets all b-values to the maximal b-value. Probably simply copies maximal b-values as well as all the b-vecs, instead of scaling the b-vecs with the b-value prior to using the b-vecs as DWMRI_gradient in Nrrd.

BRAINSDemonWarp does NOT compile against ITK v4.5rc01

Ubuntu 13.10
$ gcc --version
gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1

In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:0:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h: In instantiation of ‘void VectorThirionFunction(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = unsigned char]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:998:59:   required from ‘void VectorProcessAppType(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = unsigned char]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:1066:61:   required from ‘void VectorProcessOutputType(BRAINSDemonWarpAppParameters&) [with PixelType = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:5:42:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(0u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
       };
       ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(1u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(2u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h: In instantiation of ‘void VectorThirionFunction(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = short int]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:998:59:   required from ‘void VectorProcessAppType(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = short int]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:1071:53:   required from ‘void VectorProcessOutputType(BRAINSDemonWarpAppParameters&) [with PixelType = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:5:42:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(0u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(1u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(2u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h: In instantiation of ‘void VectorThirionFunction(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = short unsigned int]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:998:59:   required from ‘void VectorProcessAppType(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = short unsigned int]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:1076:62:   required from ‘void VectorProcessOutputType(BRAINSDemonWarpAppParameters&) [with PixelType = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:5:42:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(0u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(1u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(2u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h: In instantiation of ‘void VectorThirionFunction(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = int]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:998:59:   required from ‘void VectorProcessAppType(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = int]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:1081:51:   required from ‘void VectorProcessOutputType(BRAINSDemonWarpAppParameters&) [with PixelType = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:5:42:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(0u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(1u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(2u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h: In instantiation of ‘void VectorThirionFunction(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = float]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:998:59:   required from ‘void VectorProcessAppType(const BRAINSDemonWarpAppParameters&) [with InPixelType = double; OutPixelType = float]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:1086:53:   required from ‘void VectorProcessOutputType(BRAINSDemonWarpAppParameters&) [with PixelType = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:5:42:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(0u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(1u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:898:7: warning: narrowing conversion of ‘command.BRAINSDemonWarpAppParameters::checkerboardPatternSubdivisions.itk::Index<VIndexDimension>::operator[]<3u>(2u)’ from ‘itk::Index<3u>::IndexValueType {aka long int}’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h:23,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:14,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h: In instantiation of ‘itk::InterpolateImageFunction<TInputImage, TCoordRep>::OutputType itk::InterpolateImageFunction<TInputImage, TCoordRep>::Evaluate(const PointType&) const [with TInputImage = itk::VectorImageToImageAdaptor<float, 3u>; TCoordRep = float; itk::InterpolateImageFunction<TInputImage, TCoordRep>::OutputType = double; itk::InterpolateImageFunction<TInputImage, TCoordRep>::PointType = itk::Point<double, 3u>]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:6:1:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:96:5: error: no matching function for call to ‘itk::VectorImageToImageAdaptor<float, 3u>::TransformPhysicalPointToContinuousIndex(const PointType&, itk::InterpolateImageFunction<itk::VectorImageToImageAdaptor<float, 3u>, float>::ContinuousIndexType&) const’
     this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
     ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:96:5: note: candidate is:
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/itkVectorESMDemonsRegistrationFunction.h:28,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/itkVectorDiffeomorphicDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:19,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h:331:8: note: template<class TCoordRep> bool itk::ImageAdaptor<TImage, TAccessor>::TransformPhysicalPointToContinuousIndex(const itk::Point<TCoordRep, ImageDimension>&, itk::ContinuousIndex<TCoordRep, ImageDimension>&) const [with TCoordRep = TCoordRep; TImage = itk::VectorImage<float, 3u>; TAccessor = itk::Accessor::VectorImageToImagePixelAccessor<float>]
   bool TransformPhysicalPointToContinuousIndex(
        ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h:331:8: note:   template argument deduction/substitution failed:
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h:23,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:14,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:96:5: note:   deduced conflicting types for parameter ‘TCoordRepType’ (‘double’ and ‘float’)
     this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
     ^
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h:21,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h:23,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:14,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h: In instantiation of ‘bool itk::ImageFunction<TInputImage, TOutput, TCoordRep>::IsInsideBuffer(const PointType&) const [with TInputImage = itk::VectorImageToImageAdaptor<float, 3u>; TOutput = double; TCoordRep = float; itk::ImageFunction<TInputImage, TOutput, TCoordRep>::PointType = itk::Point<double, 3u>]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:6:1:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h:173:5: error: no matching function for call to ‘itk::VectorImageToImageAdaptor<float, 3u>::TransformPhysicalPointToContinuousIndex(const PointType&, itk::ImageFunction<itk::VectorImageToImageAdaptor<float, 3u>, double, float>::ContinuousIndexType&) const’
     m_Image->TransformPhysicalPointToContinuousIndex(point, index);
     ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h:173:5: note: candidate is:
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/itkVectorESMDemonsRegistrationFunction.h:28,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/itkVectorDiffeomorphicDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:19,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h:331:8: note: template<class TCoordRep> bool itk::ImageAdaptor<TImage, TAccessor>::TransformPhysicalPointToContinuousIndex(const itk::Point<TCoordRep, ImageDimension>&, itk::ContinuousIndex<TCoordRep, ImageDimension>&) const [with TCoordRep = TCoordRep; TImage = itk::VectorImage<float, 3u>; TAccessor = itk::Accessor::VectorImageToImagePixelAccessor<float>]
   bool TransformPhysicalPointToContinuousIndex(
        ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h:331:8: note:   template argument deduction/substitution failed:
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h:21,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h:23,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:14,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h:173:5: note:   deduced conflicting types for parameter ‘TCoordRepType’ (‘double’ and ‘float’)
     m_Image->TransformPhysicalPointToContinuousIndex(point, index);
     ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h: In instantiation of ‘bool itk::ImageFunction<TInputImage, TOutput, TCoordRep>::IsInsideBuffer(const PointType&) const [with TInputImage = itk::VectorImageToImageAdaptor<float, 3u>; TOutput = itk::CovariantVector<double, 3u>; TCoordRep = float; itk::ImageFunction<TInputImage, TOutput, TCoordRep>::PointType = itk::Point<double, 3u>]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:6:1:   required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h:173:5: error: no matching function for call to ‘itk::VectorImageToImageAdaptor<float, 3u>::TransformPhysicalPointToContinuousIndex(const PointType&, itk::ImageFunction<itk::VectorImageToImageAdaptor<float, 3u>, itk::CovariantVector<double, 3u>, float>::ContinuousIndexType&) const’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h:173:5: note: candidate is:
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/itkVectorESMDemonsRegistrationFunction.h:28,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/itkVectorDiffeomorphicDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:19,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h:331:8: note: template<class TCoordRep> bool itk::ImageAdaptor<TImage, TAccessor>::TransformPhysicalPointToContinuousIndex(const itk::Point<TCoordRep, ImageDimension>&, itk::ContinuousIndex<TCoordRep, ImageDimension>&) const [with TCoordRep = TCoordRep; TImage = itk::VectorImage<float, 3u>; TAccessor = itk::Accessor::VectorImageToImagePixelAccessor<float>]
   bool TransformPhysicalPointToContinuousIndex(
        ^
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h:331:8: note:   template argument deduction/substitution failed:
In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h:21:0,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h:21,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h:23,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h:22,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates.h:14,
                 from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/BRAINSTools/BRAINSDemonWarp/BRAINSDemonWarpTemplates_Vdouble.cxx:1:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485-new-buildsystem/ITKv4/Modules/Core/ImageFunction/include/itkImageFunction.h:173:5: note:   deduced conflicting types for parameter ‘TCoordRepType’ (‘double’ and ‘float’)
     m_Image->TransformPhysicalPointToContinuousIndex(point, index);
     ^
make[3]: *** [Modules/Remote/BRAINSTools/BRAINSDemonWarp/CMakeFiles/BRAINSDemonWarpTemplatesLIB.dir/BRAINSDemonWarpTemplates_Vdouble.cxx.o] Error 1
make[2]: *** [Modules/Remote/BRAINSTools/BRAINSDemonWarp/CMakeFiles/BRAINSDemonWarpTemplatesLIB.dir/all] Error 2
make[1]: *** [Modules/Remote/BRAINSTools/BRAINSDemonWarp/CMakeFiles/BRAINSDemonWarp.dir/rule] Error 2
make: *** [BRAINSDemonWarp] Error 2

CXX_HAS_DISABLE_OPTIMIZATION_FLAG failed

When we compile BRAINSTools on Scientific Linux release 7.1 (Nitrogen), we receive the following error (see below) - any help would be much appreciate.


Performing C++ SOURCE FILE Test CXX_HAS_DISABLE_OPTIMIZATION_FLAG failed with the following output:
Change Dir: /usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTools-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTryCompileExec1080464923/fast"
gmake[3]: Entering directory /usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTools-build/CMakeFiles/CMakeTmp' /usr/bin/gmake -f CMakeFiles/cmTryCompileExec1080464923.dir/build.make CMakeFiles/cmTryCompileExec1080464923.dir/build gmake[4]: Entering directory/usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTools-build/CMakeFiles/CMakeTmp'
/usr/local/toolboxes/cmake/cmake-3.2.2-Linux-x86_64/bin/cmake -E cmake_progress_report /usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTool$
Building CXX object CMakeFiles/cmTryCompileExec1080464923.dir/src.cxx.o
/usr/bin/c++ -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wsha$
/usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTools-build/CMakeFiles/CMakeTmp/src.cxx:1:1: error: expected unqualified-id before ‘-’ token
-O0
^
gmake[4]: *** [CMakeFiles/cmTryCompileExec1080464923.dir/src.cxx.o] Error 1
gmake[4]: Leaving directory /usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTools-build/CMakeFiles/CMakeTmp' gmake[3]: *** [cmTryCompileExec1080464923/fast] Error 2 gmake[3]: Leaving directory/usr/local/toolboxes/BRAINSTools/BTLib/BRAINSTools-build/CMakeFiles/CMakeTmp'

Source file was:
-O0

Optmize build system by having every sup-project specifying its direct requirements.

Work in progress: https://github.com/jcfr/BRAINSTools/tree/update-build-system-with-find-package-per-sub-project

To help address issue Slicer issue 3741, call to find_package associated to ITK, VTK, SlicerExecutionModel and other external projects should be moved into each sub project, library or module expecting it.

This allows to reduce both the number of include directories and the number of libraries passed to the compiler.

Moving forward, every BRAINSTools sub project, library or module should be responsible to call find_package (optionally specifying a list of components) and (if it applies) include the associated "use file".

Todo:

  • Fix issue preventing BRAINSCommonLib from building because of missing itkCastImageFilter.h
  • Teach BRAINSToolsConfig.cmake how include component required by its public interface. The idea is to do something like what is done in ITK with the Module API, in ITK for DCMTK, in Qt5, in VTK and also in the demo project jcfr/CMake-InterProject-Dependencies and more particularly in here.
  • It may be worth generalizing the ModuleAPI implemented in VTK, ITK ...

Running ./Utilities/SetupForDevelopment.sh script for the first time outputs errors.

rm: cannot remove ‘commit-msg’: No such file or directory
rm: cannot remove ‘pre-commit-style’: No such file or directory
rm: cannot remove ‘prepare-commit-msg’: No such file or directory
Setting up the uncrustify hook...
Setting up the KWStyle hook...
Setting up the cppcheck hook...
Setting up hook chaining: prepare-commit-msg, commit-msg, pre-commit
Done.

Philips Achieva DWI data can't be converted

This data was acquired on a Philips Achieva system in the Czech Republic. It is an anonymous study of a volunteer that can be shared for debugging - the same error occurs with clinical data so this is not an artifact of anonymization.

The directory tree contains the following files that are part of the same DWI series:

DICOM/IM_0027 through DICOM/IM_2048

and

DICOM/00000001/IM_0001 through DICOM/00000001/IM_358

plus a DICOM/00000001/XX_359 file.

Note there are files with the same names in both the DICOM/00000001/ and DICOM directory that have the same SeriesUID but are different InstanceUIDs.

Pointing DWIConvert to either of these directories leads to errors that I will paste below.

It is not clear to me if the problem is that DWIConvert expects all files to be in the same directory or if there is something else odd going on with this data format.

Pointed to the files from the top level

Found CommandLine Module, target is /Volumes/Slicer-4.3.1-2014-01-16-macosx-amd64/Slicer.app/Contents/lib/Slicer-4.3/cli-modules/DWIConvert
ModuleType: CommandLineModule
DWIConverter command line:

/Volumes/Slicer-4.3.1-2014-01-16-macosx-amd64/Slicer.app/Contents/lib/Slicer-4.3/cli-modules/DWIConvert --conversionMode DicomToNrrd --outputVolume /var/folders/5g/8696sbjd1blch9pwpqwzq8c40000gn/T/Slicer/EDEHE_vtkMRMLDiffusionWeightedVolumeNodeC.nrrd --inputDicomDirectory /Users/pieper/data/Czech-Philips-DWI-2014/imfiles --outputDirectory /private/tmp --smallGradientThreshold 0.2

ERROR: In /Users/kitware/Dashboards/Nightly/Slicer4/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx, line 1969
vtkSlicerCLIModuleLogic (0x12f0daaf0): DWIConverter standard error:

Exception thrown while reading DICOM volume

itk::InvalidRequestedRegionError (0x10e5cc138)
Location: "unknown"
File: /Users/kitware/Dashboards/Nightly/Slicer-build-64bits-QT4.8.5-PythonQt-With-Tcl-CLI-Release-nightly/ITKv4/Modules/IO/ImageBase/include/itkImageFileReader.hxx
Line: 338
Description: ImageIO returns IO region that does not fully contain the requested regionRequested region: ImageRegion (0x7fff5fbfb8a0)
Dimension: 3
Index: [0, 0, 0]
Size: [512, 512, 1]
StreamableRegion region: ImageRegion (0x7fff5fbfb8e0)
Dimension: 3
Index: [0, 0, 0]
Size: [128, 128, 1]

Exception creating converter
itk::InvalidRequestedRegionError (0x10e5cc138)
Location: "unknown"
File: /Users/kitware/Dashboards/Nightly/Slicer-build-64bits-QT4.8.5-PythonQt-With-Tcl-CLI-Release-nightly/ITKv4/Modules/IO/ImageBase/include/itkImageFileReader.hxx
Line: 338
Description: ImageIO returns IO region that does not fully contain the requested regionRequested region: ImageRegion (0x7fff5fbfb8a0)
Dimension: 3
Index: [0, 0, 0]
Size: [512, 512, 1]
StreamableRegion region: ImageRegion (0x7fff5fbfb8e0)
Dimension: 3
Index: [0, 0, 0]
Size: [128, 128, 1]

ERROR: In /Users/kitware/Dashboards/Nightly/Slicer4/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx, line 2000
vtkSlicerCLIModuleLogic (0x12f0daaf0): DWIConverter completed with errors

Pointed to the files in the 00000001 subdirectory

Found CommandLine Module, target is /Volumes/Slicer-4.3.1-2014-01-16-macosx-amd64/Slicer.app/Contents/lib/Slicer-4.3/cli-modules/DWIConvert
ModuleType: CommandLineModule
DWIConverter command line:

/Volumes/Slicer-4.3.1-2014-01-16-macosx-amd64/Slicer.app/Contents/lib/Slicer-4.3/cli-modules/DWIConvert --conversionMode DicomToNrrd --outputVolume /var/folders/5g/8696sbjd1blch9pwpqwzq8c40000gn/T/Slicer/EDEHE_vtkMRMLDiffusionWeightedVolumeNodeC.nrrd --inputDicomDirectory /Users/pieper/data/Czech-Philips-DWI-2014/im01files --outputDirectory /private/tmp --smallGradientThreshold 0.2

ERROR: In /Users/kitware/Dashboards/Nightly/Slicer4/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx, line 1969
vtkSlicerCLIModuleLogic (0x12f0daaf0): DWIConverter standard error:

Exception creating converter
itk::ExceptionObject (0x104005038)
Location: "unknown"
File: /Users/kitware/Dashboards/Nightly/Slicer-build-64bits-QT4.8.5-PythonQt-With-Tcl-CLI-Release-nightly/BRAINSTools/DWIConvert/DWIConverter.h
Line: 167
Description: itk::ERROR: Missing DICOM Slice files: Number of slice files (358) not evenly divisible by the number of slice locations

ERROR: In /Users/kitware/Dashboards/Nightly/Slicer4/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx, line 2000
vtkSlicerCLIModuleLogic (0x12f0daaf0): DWIConverter completed with errors

Remove debug statement displaying "HERE"

jchris@karakoram:~/Projects/Slicer-AHM-Superbuild-Debug/BRAINSTools [(0e40329...)] $ ack --cmake "\"HERE"
CMake/itkCheckSourceTree.cmake
2:message(STATUS "HERE: ${CMAKE_CURRENT_SOURCE_DIR}")
5:message(STATUS "HERE2")

Shadow declaration in GenericTransformImage

Slicer r23029
BRAINSTools bd755e2

/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx: In instantiation of ‘void itk::WriteTransformToDisk(const itk::Transform<TScalarType, 3u, 3u>*, const string&) [with TScalarType = double; std::string = std::basic_string<char>]’:
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx:146:83:   required from here
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx:472:86: warning: declaration of ‘BSplineTransformType’ shadows a global declaration [-Wshadow]
                                                GenericTransformImageNS::SplineOrder> BSplineTransformType;
                                                                                      ^
In file included from /path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx:2:0:
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:54:43: warning: shadowed declaration is here [-Wshadow]
     GenericTransformImageNS::SplineOrder> BSplineTransformType;
                                           ^
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx: In instantiation of ‘void itk::WriteTransformToDisk(const itk::Transform<TScalarType, 3u, 3u>*, const string&) [with TScalarType = float; std::string = std::basic_string<char>]’:
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx:551:136:   required from here
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx:472:86: warning: declaration of ‘BSplineTransformType’ shadows a global declaration [-Wshadow]
                                                GenericTransformImageNS::SplineOrder> BSplineTransformType;
                                                                                      ^
In file included from /path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.cxx:2:0:
/path/to/Slicer-SuperBuild-Debug-Qt485/Slicer-build/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:54:43: warning: shadowed declaration is here [-Wshadow]
     GenericTransformImageNS::SplineOrder> BSplineTransformType;

Unable to compile with VS2010 Win64

Unable to compile BRAINSTools HEAD with VS2010 Win64:

  • teem branch external project does not compile, however latest teem works:
    1. in src\gage\stackBlur.c bzero is gcc only, memset is platform independent
    2. in src\meet\meetPull.c line 169 should move to 152
  • ANTs library does not compile:
    1. in Examples\ImageMath.cxx nesting of code blocks exceeds the limit of 128 nesting levels, changing "else if" to if in line 14881 solves the issue.

    2. in ExternalApplications\MALF\CorrectiveLearning\segAdapter.cxx from line 501 should be modified to

      NeighborhoodIteratorType::OffsetType offset;
      offset[0] = j;
      offset[1] = k;
      offset[2] = l;
      X[C++] = autosegnit.GetPixel( offset );
      for( size_t it = 0; it < ims.size(); it++ )
      {
      X[C++] = imnits[it].GetPixel( offset );
      }

    3. in ExternalApplications\MALF\JointFusion\LabelFusion.cxx line 330 should be

      int* tmap = new int[MaxV+1];
      and line 342
      delete[] tmap;

    4. in ExternalApplications\MALF\JointFusion\WeightedVotingLabelFusionImageFilter.txx from line 319:

      InputImagePixelType *bestMatchSum = new InputImagePixelType[m_Modality];
      InputImagePixelType *bestMatchSSQ = new InputImagePixelType[m_Modality];
      InputImagePixelType *bestMatchMean = new InputImagePixelType[m_Modality];
      InputImagePixelType *bestMatchVar = new InputImagePixelType[m_Modality];
      InputImagePixelType *bestMatchSD = new InputImagePixelType[m_Modality];
      InputImagePixelType *MatchSum = new InputImagePixelType[m_Modality];
      InputImagePixelType *MatchSSQ = new InputImagePixelType[m_Modality];
      and from line 379:
      delete[] bestMatchSum;
      delete[] bestMatchSSQ;
      delete[] bestMatchMean;
      delete[] bestMatchVar;
      delete[] bestMatchSD;
      delete[] MatchSum;
      delete[] MatchSSQ;

    5. in Utilities\itkGeometricJacobianDeterminantImageFilter.hxx line 184, 187 and 190 vcl_sqrt( 3.0 ) should be used.

With these modification I was able to compile dependent libraries, however I still have a few problems I cannot figure out in BRAINSTools BRAINSCommonLib project:

  1. Error 1 error C2244: 'ants::RegistrationHelper<TComputeType,VImageDimension>::SetFixedImageMask' : unable to match function definition to an existing declaration d:\devel\brainstools-x64\ants\examples\itkantsRegistrationHelper.hxx 827
  2. Error 2 error C2244: 'ants::RegistrationHelper<TComputeType,VImageDimension>::SetMovingImageMask' : unable to match function definition to an existing declaration d:\devel\brainstools-x64\ants\examples\itkantsRegistrationHelper.hxx 838

unrecognized command line option "-Wno-long-double"

Hi,

We're trying to install BRAINSTools on Scientific Linux release 6.6 (Carbon), with:
gcc (and g++) version: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11).

Code run:

git clone https://github.com/BRAINSia/BRAINSTools.git
mkdir BRAINSTools-build && cd BRAINSTools-build
CC=/usr/bin/gcc
CXX=/usr/bin/g++
ccmake ../BRAINSTools
-DUSE_BRAINSFit:BOOL=ON
-DUSE_BRAINSConstellationDetector:BOOL=ON
-DUSE_BRAINSABC:BOOL=ON
-DUSE_ConvertBetweenFileFormats:BOOL=ON
-DUSE_BRAINSSurfaceTools:BOOL=OFF
-DPYTHON_EXECUTABLE:PATH=/usr/pubsw/packages/python/epd/bin/python2.7
-DPYTHON_LIBRARY:PATH=/usr/pubsw/packages/python/epd/lib
-DPYTHON_INCLUDE_DIR:PATH=/usr/pubsw/packages/python/epd/include
make -j 1 -k
make

We are getting the following error:

[ 98%] Building CXX object Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase.dir/itkTransformFileWriterSpecializations.cxx.o
/opt/BRAINSTools-build/ITKv4/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx:176: error: using ‘typename’ outside of template
/opt/BRAINSTools-build/ITKv4/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx:177: error: using ‘typename’ outside of template
/opt/BRAINSTools-build/ITKv4/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx:184: error: using ‘typename’ outside of template
/opt/BRAINSTools-build/ITKv4/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx:185: error: using ‘typename’ outside of template
cc1plus: warning: unrecognized command line option "-Wno-long-double"
make[5]: *** [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase.dir/itkTransformFileWriterSpecializations.cxx.o] Error 1
make[4]: *** [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [ITKv4-prefix/src/ITKv4-stamp/ITKv4-build] Error 2
make[1]: *** [CMakeFiles/ITKv4.dir/all] Error 2
make: *** [all] Error 2

After some searching online, I came across some references saying that the -Wno-long-double argument is no longer needed in most cases. I found a source saying that the autoconf scripts should be running a test to determine whether or not gcc accepts the -Wno-long-double argument, so we tried adding these two lines to the file CMakeCache.txt in the BRAINSTools-build directory (not at all sure if these settings make sense):

//Test C_HAS_WARNING-Wno-long-double
C_HAS_WARNING-Wno-long-double:INTERNAL=1

followed by running just ‘make’ from that directory, but got the same error.

Another source was saying it might be the gcc version, and that some (older) versions of the compiler gcc don’t accept this argument (current version is 4.8.X), but the gcc version is exactly the same as on another system we successfully installed BRAINSTools on, so I don't think that is it.

Do you have ideas as to how we might be able to fix this issue?

Thanks very much in advance.

Gabriëlla

Followup with Alex about progress

Eric: Please send Alex your notes on how to install “homebrew”

a: Install Xcode
b: Install homebrew (google homebrew mac package manager)
c: brew install git, cmake, subversion, autoconf, automake
d: "Unix Makefiles = Generates standard UNIX makefiles.”
e: Find some ascii code editor

1: Make a github account
2: Fork https://github.com/BRAINSia/BRAINSTools into your own account
3: Build BRIANSTools on your mac.
4: in the ${mybuilddir}/BRAINSTools-build directory, run ctest and commit results of your local directory to the dashboard “make Experimental”

RESULTS:

  1. Updates to the readme file as a pull request on github from your account to the BRAINSia account.
  2. Using “make Experimental” push a test of the BRAINSTools package to the crash server, and demonstrate which tests fail in your build environment.

GOOD LUCK!

Hans

When writing bvec,bval files, the bvec values should all be unit norm

Kent,

When writing bvec files, the vectors all need to be normalized to unit length. For this format, the magnitude of the bval is encoded separately from the directions. (in the NRRD files they are combined).

Could you make this change quickly?

Thanks,
Hans

hi martin and hans,

indeed the place where the issue is in the conversion. i would like to note that even with single b-values, scanners cannot always hit the right target, so when q is estimated from the B matrix, you can often see values that are around the target but not exactly equal to it.

so far a bmax of 1000, you might see values as seen in this scan: 995, 974, etc.,. depending on the gradient direction and the gradients that came before it.

martin: there is no standard. but i think if we wrote out fsl style, then doing bvecs as unit norm and bvals reflecting magnitude makes sense.

cheers,

satra

On Wed, Jan 22, 2014 at 11:12 AM, Johnson, Hans J [email protected] wrote:
Martin’s comments are a good guess that it is a bug in DWIConvert for nrrd files.

It should be a very easy fix. We have always been working with single b-value DWI’s so we probably missed the norming step.

Hans

From: Martin Styner [email protected]
Date: Wednesday, January 22, 2014 at 10:08 AM
To: Satrajit Ghosh [email protected]
Cc: Francois Budin [email protected], Hans Johnson [email protected], Kent Williams [email protected]

Subject: Re: vector norms from DTIPrep

Hi Satra

Not 100% where the problem is, but likely in NRRD to FSL conversion. In NRRD, the bvecs are NOT unit norm, but rather the norm scales the single b-value recorded in the header. For FSL, you have a bval file with different bvalues per DWI (different to NRRD), so my expectation is an imperfect conversion from NRRD to FSL, where all the bvals are the same and the bvecs scale the ovals (rather than all the bvals should be slightly different and the bvecs should be unit norm).

If the unit norm requirement on the bvecs a “standard” for the nifti DWI format, or does FSL simply assume so?

Martin

Martin Styner, PhD. MS ETH
Associate Professor
Neuro Image Analysis and Research Lab
Carolina Institute of Developmental Disabilities
Departments of Psychiatry and Computer Science
CB 7160, University of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7160
Cell: 919 260 6674
Fax: 919 962 1799

On Jan 22, 2014, at 11:01 AM, Satrajit Ghosh [email protected] wrote:

update:

the norm of the bvecs are representing the percentage of bmax, i.e. the bvals. i think if we are writing out bvecs and bvals, the bvecs should be unit norm, no?

cheers,

satra

On Wed, Jan 22, 2014 at 10:48 AM, Satrajit Ghosh [email protected] wrote:
hi folks,

i'm seeing the following from an older version of DTIprep.

In [5]: bvecs = np.genfromtxt('P9_QCed.bvec')
In [6]: vector_norm(bvecs)
Out[6]: 
array([ 0.        ,  1.00000001,  0.99999999,  1.00000006,  0.99999999,
        1.0000001 ,  0.97467948,  1.00000006,  0.97467935,  1.00000006,
        0.9999999 ,  0.97467951,  0.99999998,  0.97467948,  0.99999991,
        1.00000009,  0.9746795 ,  1.        ,  0.99999993,  1.00000008,
        0.99999996,  1.        ,  1.00000009,  1.00000014,  0.97467939,
        0.97467938,  1.00000009,  1.        ,  1.00000005,  1.00000011,
        1.0000001 ,  0.99999996,  1.00000002,  0.99999979,  1.00000004,
        0.99999999,  0.97467945,  0.97467947,  1.00000007,  1.00000016,
        0.97467938,  1.00000005,  0.99999994,  0.97467936,  0.99999998,
        0.97467946,  1.00000003,  1.00000003,  0.97467924,  0.99999995,
        0.99999998,  0.99999973,  0.97467948,  1.00000003,  1.00000008,
        0.97467943,  1.00000008,  1.00000006,  1.00000001,  0.99999997,
        1.        ,  0.99999998])

as you can see many of the vector norms are not that close to 1 and is therefore throwing off some tools i am using.

just checking if this is something you have come across and fixed in more recent versions.

processing route: dicoms -> nrrd -> dtiprep -> fsl

cheers,

satra

ps. i'm trying to compile the latest - running into some qt issues - but that's my problem.

Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.

Siemens Sonata DWIConvert issue from slicer-users list

---------- Forwarded message ----------
From: uhlich [email protected]
Date: Fri, Oct 18, 2013 at 12:34 PM
Subject: [slicer-users] Siemens Sonata DWIConvert Issue
To: [email protected]

Hi all,
Thanks to afe in the last thread, I know how to use DWIConvert on CentOS
now.

Interestingly, it still has a small issue that I had run up against a few
times while using DicomToNrrdConverter on my Windows machine on large
amounts of data. I have been converting MRI volumes from Dicom series to
NRRD and the issue (I believed at the time) was with non-square MRI images.
Everytime I input an MRI volume containing non-square slices,
DicomToNrrdConverter would hang indefinitely. I couldn't figure it out so I
just stopped trying on non-square volumes (there were a relatively small
number of them in my dataset).

Skip ahead a while and now I am using DWIConvert and finding the same
problem. Only since then I've been made aware of a Siemens issue, and the
use of --useBMatrixGradientDirections to recompute erroneous vector
coordinates. It was then that I realized that most of these non-square
volumes (if not all) are from Siemens. So I tried that flag thinking
everything was solved, but it still didn't work. What follows is hopefully
relevant data from a particular example.

Size of the volume = 512 x 416 x 19

Manufacturer: 'SIEMENS'
ManufacturerModelName: 'Sonata'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Command Line Arguments
conversionMode: DicomToNrrd
inputVolume:
outputVolume: TestsDir3/Vol.nrrd
fMRIOutput: 0
inputDicomDirectory: CR00491/2002-06-17/T1C/raw
outputDirectory: .
gradientVectorFile:
smallGradientThreshold: 0.2
writeProtocolGradientsFile: 0
useIdentityMeaseurementFrame: 0
useBMatrixGradientDirections: 1
inputBValues:
inputBVectors:
outputBValues:
outputBVectors:
echoSwitch: 1
xmlSwitch: 0
processInformationAddressString: 0
returnParameterFile:
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (8b1f,0008) is odd
E: DcmElement: Unknown Tag & Data (8b1f,0008) larger (1297806941) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
W: DcmItem: Length of element (5089,474e) is odd
E: DcmElement: Unknown Tag & Data (5089,474e) larger (169478669) than
remaining bytes in file
=================== this->m_SlicesPerVolume:19
Dicom images are ordered in a volume interleaving way.
ImageOrientationPatient (0020:0037): LPS Orientation Matrix
0.999328 1.33802e-10 -0.0366437
-0.00287503 0.996917 -0.0784064
0.0365308 0.0784591 0.996248

this->m_SpacingMatrix
0.429688 0 0
0 0.429688 0
0 0 5

NRRDSpaceDirection
0.429399 5.74932e-11 -0.183219
-0.00123537 0.428363 -0.392032
0.0156968 0.0337129 4.98124

Slice 0: -93.7762 -122.603 -98.8518
Slice 1: -94.0511 -123.191 -91.3799
Slice order is IS
Warning: Cannot find complete information on B_value in 0029|1010
/home/uhlich/BadRegistrationTests/CR00491/2002-06-17/T1C/raw/Image001.dcm
has no non-zero diffusion vectors
Exception extracting gradient vectors
itk::ExceptionObject (0x250d810)
Location: "unknown"
File:
/home/kitware/Dashboards/Package/Slicer-431-package/BRAINSTools/DWIConvert/SiemensDWIConverter.h
Line: 294
Description: itk::ERROR:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Fix shadow warnings

These warning has been found bulding BRAINSTool in Slicer using c93655a

In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:313:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.hxx: In instantiation of ‘void itk::BRAINSFitHelperTemplate<FixedImageType, MovingImageType>::Update() [with FixedImageType = itk::Image<float, 3u>; MovingImageType = itk::Image<float, 3u>]’:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:438:20:   required from ‘void itk::BRAINSFitHelper::RunRegistration() [with TLocalCostMetric = itk::MattesMutualInformationImageToImageMetricv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double>]’
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:320:43:   required from here
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.hxx:1177:74: warning: declaration of ‘BSplineTransformType’ shadows a global declaration [-Wshadow]
       typedef itk::BSplineTransform<double, SpaceDimension, SplineOrder> BSplineTransformType;
                                                                          ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.hxx:39:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:553,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:69:85: warning: shadowed declaration is here [-Wshadow]
                                         GenericTransformImageNS::SplineOrder>       BSplineTransformType;
                                                                                     ^
[...]

In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h:283:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx:31,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h:452,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:44,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx: In instantiation of ‘bool itk::RegistrationParameterScalesEstimator<TMetric>::IsBSplineTransform() [with TMetric = itk::MattesMutualInformationImageToImageMetricv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double>]’:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx:98:5:   required from ‘void itk::RegistrationParameterScalesFromShiftBase<TMetric>::EstimateScales(itk::RegistrationParameterScalesFromShiftBase<TMetric>::ScalesType&) [with TMetric = itk::MattesMutualInformationImageToImageMetricv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double>; itk::RegistrationParameterScalesFromShiftBase<TMetric>::ScalesType = itk::OptimizerParameters<double>]’
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:629:1:   required from here
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx:173:62: warning: declaration of ‘CompositeTransformType’ shadows a global declaration [-Wshadow]
       typedef CompositeTransform<FloatType, MovingDimension> CompositeTransformType;
                                                              ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.hxx:39:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:553,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:71:62: warning: shadowed declaration is here [-Wshadow]
 typedef itk::CompositeTransform<double, 3>                   CompositeTransformType;
                                                              ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h:283:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx:31,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h:452,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:44,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx:192:61: warning: declaration of ‘CompositeTransformType’ shadows a global declaration [-Wshadow]
       typedef CompositeTransform<FloatType, FixedDimension> CompositeTransformType;
                                                             ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.hxx:39:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:553,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:71:62: warning: shadowed declaration is here [-Wshadow]
 typedef itk::CompositeTransform<double, 3>                   CompositeTransformType;
                                                              ^
[ 92%] Building CXX object Modules/Loadable/Volumes/Widgets/Testing/Cxx/CMakeFiles/qSlicerVolumesModuleWidgetsCxxTests.dir/qSlicerDTISliceDisplayWidgetTest2.cxx.o
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h:283:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx:31,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h:452,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:44,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx: In instantiation of ‘bool itk::RegistrationParameterScalesEstimator<TMetric>::IsBSplineTransform() [with TMetric = itk::ImageToImageMetricv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double, itk::DefaultImageToImageMetricTraitsv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double> >]’:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx:98:5:   required from ‘void itk::RegistrationParameterScalesFromShiftBase<TMetric>::EstimateScales(itk::RegistrationParameterScalesFromShiftBase<TMetric>::ScalesType&) [with TMetric = itk::ImageToImageMetricv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double, itk::DefaultImageToImageMetricTraitsv4<itk::Image<float, 3u>, itk::Image<float, 3u>, itk::Image<float, 3u>, double> >; itk::RegistrationParameterScalesFromShiftBase<TMetric>::ScalesType = itk::OptimizerParameters<double>]’
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:629:1:   required from here
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx:173:62: warning: declaration of ‘CompositeTransformType’ shadows a global declaration [-Wshadow]
       typedef CompositeTransform<FloatType, MovingDimension> CompositeTransformType;
                                                              ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.hxx:39:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:553,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:71:62: warning: shadowed declaration is here [-Wshadow]
 typedef itk::CompositeTransform<double, 3>                   CompositeTransformType;
                                                              ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h:283:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h:21,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx:31,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h:452,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:44,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/ITKv4/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx:192:61: warning: declaration of ‘CompositeTransformType’ shadows a global declaration [-Wshadow]
       typedef CompositeTransform<FloatType, FixedDimension> CompositeTransformType;
                                                             ^
In file included from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.hxx:39:0,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/genericRegistrationHelper.h:553,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelperTemplate.h:62,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.h:43,
                 from /home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/BRAINSFitHelper.cxx:21:
/home/jchris/Projects/Slicer-2-SuperBuild-Debug/BRAINSTools/BRAINSCommonLib/GenericTransformImage.h:71:62: warning: shadowed declaration is here [-Wshadow]
 typedef itk::CompositeTransform<double, 3>                   CompositeTransformType;

DicomConvert: FSL to NRRD - bvec in line instead of column

Hello,

This is not a bug, but a feature request.
I saw that in certain cases the b-vec files I am getting (eg from TORTOISE) are in the following order:
x1 x2 x3 ...
y1 y2 y3 ...
z1 z2 z3 ...
instead of
x1 y1 z1
x2 y2 z2
x3 y3 z3
...
It would be great if there could be a new flag in DicomConvert that would allow the user to specify how the b-vecs are oriented.
Sincerely,

Francois

built target ANTs Error

There is 2 error when the src was built in ubuntu 12.04.5. The tip is "no install step for 'ANTS' ".

some debugging code is causing BRAINS in Slicer to fail

Miller, James V (GE Global Research)
9:35 AM (45 minutes ago)

to Jean-Christophe, me, Hans
It also looks like the file referenced was last changed during the port of BrainsFit to the ITKv4 registration framework. So some of the performance issues could be related to that.

Jim

From: Jean-Christophe Fillion-Robin [mailto:[email protected]]
Sent: Monday, July 07, 2014 9:32 AM
To: Steve Pieper
Cc: Miller, James V (GE Global Research); Hans J. Johnson

Subject: Re: [slicer-users] BRAINS registration cannot register what it could before

Hi from SciPy,

@jim: Good catch. Here is the issue:

if ( true ) // add DebugLevel here.

@hans: As soon you fixed it in BRAINStools master, let me know and I will back port it into the Slicer/BRAINSTools fork.

Thanks
Jc

On Mon, Jul 7, 2014 at 9:29 AM, Steve Pieper [email protected] wrote:
Yes, now that I actually read the message that looks clear enough. Here it is with emphasis. I'm hopping on a phone call now, but this seems like an inherently fixable issue.

@hans, do you know the answer?

-Stve

File: c:\d\n\slicer-1-build\brainstools\brainscommonlib\BRAINSFitHelperTemplate.hxx
Line: 617
Description: itk::ERROR: Exception caught during registration:
itk::ExceptionObject (00000000072517C8)
Location: "unknown"
File: c:\d\n\slicer-1-build\itkv4\modules\io\transformbase\include\itkTransformIOBase.hxx
Line: 96
Description: itk::ERROR: MatlabTransformIOTemplate(0000000019F267E0): Failed opening fileDEBUGTransform_RegFilterOutput.mat

On Mon, Jul 7, 2014 at 9:25 AM, Miller, James V (GE Global Research) [email protected] wrote:
One thing that jumps out to me is that the exception is regarding the writing of file that is not listed in the command line. Perhaps some debugging code was checked in accidently?

Jim

From: Steve Pieper [mailto:[email protected]]
Sent: Monday, July 07, 2014 9:15 AM
To: Hans J. Johnson
Cc: Miller, James V (GE Global Research); [email protected]
Subject: Fwd: [slicer-users] BRAINS registration cannot register what it could before

Do we know what happened here and how to fix it?

-Steve

---------- Forwarded message ----------
From: Csaba Pinter [email protected]
Date: Mon, Jul 7, 2014 at 8:20 AM
Subject: Re: [slicer-users] BRAINS registration cannot register what it could before
To: "[email protected]" [email protected]

This issue makes the BRAINS registration in Slicer basically unusable, so I would be extremely grateful if someone acknowledged this!
Please either fix ASAP or revert to a working version.

Thanks,
csaba

Allow to turn off atlas download

For users like me, who only need registration, this is not really needed - takes a long time to download.

Minor issue, on the relative scale.

Registration deconverges

Invoking the registration (from e.g. nightly build of Slicer) with many parameter combinations (including the defaults) with below inputs (fixed and moving images and initial registration transform which is very close) results in registration veering off course. This should not happen. Both images together are 1 megabyte.

https://dl.dropboxusercontent.com/u/48665006/bugFixed.nrrd
https://dl.dropboxusercontent.com/u/48665006/bugMoving.nrrd
https://dl.dropboxusercontent.com/u/48665006/bugInitial.txt

BRAINS without V3 compatibility

-----Original Message-----
From: , Hans Johnson [email protected]
Date: Wednesday, September 24, 2014 at 9:39 AM
To: Bradley Lowekamp [email protected]
Cc: Kent Williams [email protected]
Subject: Re: BRAINS without V3 compatibility

Kent,

Please take care of this ASAP this week.

Hans

-----Original Message-----
From: Bradley Lowekamp [email protected]
Date: Wednesday, September 24, 2014 at 9:37 AM
To: Hans Johnson [email protected]
Cc: Kent Williams [email protected]
Subject: BRAINS without V3 compatibility

Hans,

I am only getting one compilation error when compiling BRAINS is Slicer3d
with out V3 compatibility and 64-bit IDS.

I am getting a funny error here:
https://github.com/BRAINSia/BRAINSTools/blob/master/BRAINSStripRotation/BRA
INSStripRotation.cxx#L31

because there is no New method available, for the Ridgid3DTransform
without V3 Compatibility:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/T
ransform/include/itkRigid3DTransform.h#L68-L71

I am not sure if other issues related to this transform in BRANSTOOLS and
the v3 compatibility.

Thanks,
Brad

Fix Failing Test for BRAINSABC

Alex,

Please do the main work for this, and then send the email to @aghayoor ([email protected])

The BRAINSABC test that is failing regression.

This is the test that is failing:
http://testing.psychiatry.uiowa.edu/CDash/testDetails.php?test=765554&build=38026

After review, I have determined that this test result is good.

Please make an e-mail to @aghayoor with the instructions necessary to fix this failing test.

Hans

HINTS:
%man md5
% cd BRAINSTools/TestData; cat scan1T1.nii.gz.md5
% cat BRAINSTools/CMake/ExternalData.cmake
% printenv |grep OBJE
ExternalData_OBJECT_STORES=/Shared/sinapse/sharedopt/CommonCDashScripts/ExternalData/Objects

Report what exception is before re-throwing

Currently, exception is not caught, and the user get this cryptic error message when output file cannot be created:

libc++abi.dylib: terminate called throwing an exception

Here is the fix:

--- a/BRAINSCommonLib/GenericTransformImage.cxx
+++ b/BRAINSCommonLib/GenericTransformImage.cxx
@@ -206,6 +206,7 @@ int WriteBothTransformsToDisk(const GenericTransformType::ConstPointer genericTr
     }
   catch( itk::ExceptionObject & excp )
     {
+    std::cout << "Exception: " << excp << std::endl;
     throw excp; // reohrow exception, handle in some other scope.
     }
   return 0;

I tried to create a pull request, but I am unable to commit the change (to my own git fork!), because of this error message: "Your work tree has not been configured for development." Running ITK_DIR/Utilities/SetupForDevelopment.sh does not fix this error. Can you tell me how to fix this?

DWIConvert alters bval/bvector values

I've noticed that DWIConvert gets different b-values and b-vectors than what is represented in the DICOM files either when inspecting the DICOM files or using dcm2nii to grab values. For example, with a b-value of 1000, DWIConvert seems to interpret this as 1002.

And while the first gradient out of dcm2nii is reported as:
0.0471797 -0.906431 0.419709

The corresponding vector from DWIConvert is read as:
-0.047709 -0.920511 -0.387794

Is there some reorientation of the data going on during the conversion? The dcm2nii values match what we have coded into the scanner.

Remove ITKv3Compatibility use in BRAINSCommonLib, BRAINSDemonWarp, ICCDEF

Checked against 6b15c2b

using the following one-liner

ITK_SRC=/path/to/ITKv4

$ for f in $(ls -1 $ITK_SRC/Modules/Compatibility/V3Compatibility/include/*.h); do p=$(echo $(basename $f) | cut -d"." -f1); printf "\n"; printf '%.s-' {1..80}; printf "\n"; printf "Searching $p\n"; ack-grep $p; printf "... done\n"; done

Detailed listing:

--------------------------------------------------------------------------------
Searching itkAddConstantToImageFilter
... done

--------------------------------------------------------------------------------
Searching itkDeformationFieldJacobianDeterminantFilter
... done

--------------------------------------------------------------------------------
Searching itkDeformationFieldSource
... done

--------------------------------------------------------------------------------
Searching itkDivideByConstantImageFilter
... done

--------------------------------------------------------------------------------
Searching itkExponentialDeformationFieldImageFilter
... done

--------------------------------------------------------------------------------
Searching itkGradientToMagnitudeImageFilter
... done

--------------------------------------------------------------------------------
Searching itkImageToVectorImageFilter
ICCDEF/itkICCDeformableFunction.hxx
42:#include "itkImageToVectorImageFilter.h"
... done

--------------------------------------------------------------------------------
Searching itkInverseDeformationFieldImageFilter
... done

--------------------------------------------------------------------------------
Searching itkIterativeInverseDeformationFieldImageFilter
... done

--------------------------------------------------------------------------------
Searching itkKernelFunction
... done

--------------------------------------------------------------------------------
Searching itkMultiplyByConstantImageFilter
ICCDEF/itkICCDeformableFunction.hxx
44:#include "itkMultiplyByConstantImageFilter.h"

ICCDEF/AverageBrainGenerator.cxx
34:#include "itkMultiplyByConstantImageFilter.h"

ICCDEF/itkICCDeformableRegistrationFilter.h
34:#include "itkMultiplyByConstantImageFilter.h"

BRAINSDemonWarp/itkDiffeomorphicDemonsRegistrationWithMaskFilter.h
24:#include "itkMultiplyByConstantImageFilter.h"

BRAINSDemonWarp/VDemonsRegistrator.hxx
45:#include "itkMultiplyByConstantImageFilter.h"

BRAINSDemonWarp/VValidationInputParser.hxx
38:#include "itkMultiplyByConstantImageFilter.h"
... done

--------------------------------------------------------------------------------
Searching itkOtsuThresholdImageCalculator
BRAINSCommonLib/itkLargestForegroundFilledMaskImageFilter.hxx
163:    hsize[0] = 128;  // V3 itkOtsuThresholdImageCalculator.hxx m_NumberOfHistogramBins = 128
... done

--------------------------------------------------------------------------------
Searching itkSubtractConstantFromImageFilter
... done

--------------------------------------------------------------------------------
Searching itkTransformToDeformationFieldSource
... done

This is motivated by the fact within Slicer, we would like to build ITK with the option ITK_USE_64BITS_IDS enabled. For this to work, the option ITKV3_COMPATIBILITY has to be disabled.

For reference, see:

Notify @pieper, @blowekamp

DWIConvert Images inverted.

DWIConvert loading images upside down.

Ali: We need a test that fails with the current code, and succeeds when the BUG regarding upside down data is resolved.

Here is a test patch to try. I did not test it, I only made changes based on a guess to the problem. The code that you isolated changed behavior due to refactoring when adding the "else" component. of the if statement.

https://github.com/BRAINSia/BRAINSTools/tree/DWIConvertFixAttempt

make error : get_property could not find TARGET zlib. Perhaps it has not yet been created.

Suggestions?
Debian system, first time to build complete version of BRAINSTools.
Error message:

-- SuperBuild - BRAINSTools => Requires DCMTK, ITKv4, SlicerExecutionModel, teem, Boost, ReferenceAtlas, VTK, OpenCV, ANTs, PCRE, Swig, SimpleITK, NIPYPE,
-- SuperBuild - First pass
-- SuperBuild - First pass - done
CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:642 (get_property):
get_property could not find TARGET zlib. Perhaps it has not yet been
created.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:856 (ExternalProject_Get_Property)
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:1331 (_ep_get_step_stampfile)
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:1545 (_ep_add_configure_command)
/media/Software/Slicer/Slicer/CMake/ExternalProjectDependency.cmake:668 (ExternalProject_Add)
/media/Software/Slicer/Slicer/SuperBuild/External_DCMTK.cmake:68 (ExternalProject_Add_Empty)
/media/Software/Slicer/Slicer-Quick-test/BRAINSTools/CMake/SlicerMacroCheckExternalProjectDependency.cmake:69 (include)
/media/Software/Slicer/Slicer-Quick-test/BRAINSTools/SuperBuild.cmake:246 (SlicerMacroCheckExternalProjectDependency)
/media/Software/Slicer/Slicer-Quick-test/BRAINSTools/CMakeLists.txt:30 (include)

CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:644 (message):
External project "zlib" has no stamp_dir
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:856 (ExternalProject_Get_Property)
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:1331 (_ep_get_step_stampfile)
/usr/share/cmake-2.8/Modules/ExternalProject.cmake:1545 (_ep_add_configure_command)
/media/Software/Slicer/Slicer/CMake/ExternalProjectDependency.cmake:668 (ExternalProject_Add)
/media/Software/Slicer/Slicer/SuperBuild/External_DCMTK.cmake:68 (ExternalProject_Add_Empty)
/media/Software/Slicer/Slicer-Quick-test/BRAINSTools/CMake/SlicerMacroCheckExternalProjectDependency.cmake:69 (include)
/media/Software/Slicer/Slicer-Quick-test/BRAINSTools/SuperBuild.cmake:246 (SlicerMacroCheckExternalProjectDependency)
/media/Software/Slicer/Slicer-Quick-test/BRAINSTools/CMakeLists.txt:30 (include)

-- Configuring incomplete, errors occurred!
make[2]: *** [Slicer-prefix/src/Slicer-stamp/Slicer-configure] Error 1
make[1]: *** [CMakeFiles/Slicer.dir/all] Error 2
make: *** [all] Error 2

DWIConvert error when trying to convert DICOM to NRRD

Hello,

I'm currently trying to convert a DICOM directory into a NRRD file trough your slicer plugin DWIConvert.

When I run the command line:
./DWIConvert --inputDicomDirectory /home/felix/Downloads/1020_DICOMS --outputDirectory /home/felix/Downloads/Test --outputVolume test.nrrd

I have the following report:
terminate called without an active exception
Aborted (core dumped)

I am using the latest version of Slicer.

Thanks,
Felix

Include ExternalData conditionally

See 3b3b8c4#commitcomment-2784641

By applying the method reported in the comment, Slicer will be ensured to include its own version instead of the one bundled with BRAINS.

Waiting that all of our projects depends strictly on CMake 2.8.11, it allows the ExternalData.cmake within Slicer to be different ...

BRAINS modules complain about libBRAINSCommonLib.a missing. At build log strange directory for search of this file.

Error:

Building CXX object Libs/MRML/Core/Testing/CMakeFiles/MRMLCoreCxxTests.dir/vtkMRMLSceneEventRecorder.cxx.o
Linking CXX static library ../../../../lib/Slicer-4.3/libBRAINSCommonLib.a
/usr/bin/ar: CMakeFiles/BRAINSCommonLib.dir/BRAINSFitHelper.cxx.o: No such file or directory
....
make[5]: *** No rule to make target `lib/Slicer-4.3/libBRAINSCommonLib.a', needed by `lib/Slicer-4.3/cli-modules/libBRAINSPosteriorToContinuousClassLib.so'. Stop.



At ccmake only cmake_ar is pointing to that directory. Any ideas what should be changed and how, to get it work? 

Originally reported on Slice tracker: http://www.na-mic.org/Bug/view.php?id=3739

BRAINSABC segfaults without the '--atlasToSubjectInitialTransform' flag

From: , Hans Johnson [email protected]
Date: Wednesday, September 24, 2014 at 9:00 AM
To: Vincent Magnotta [email protected]
Cc: Kent Williams [email protected], David Welch [email protected]
Subject: Re: BRAINSABC Bug

Kent,

Please initialize this variable to an identity transform so that if it is not explicitly specified that it will have the correct value.

Hans

From: , Vincent Magnotta [email protected]
Date: Wednesday, September 24, 2014 at 8:50 AM
To: Hans Johnson [email protected]
Cc: Kent Williams [email protected], David Welch [email protected]
Subject: BRAINSABC Bug

If you run BRAINSABC from the command line without the —atlasToSubjectInitialTransform option it will seg fault on line 433 of AtlasRegistrationMethod.hxx because the variable m_AtlasToSubjectInitialTransform was not being initialized in this case. I just tried a test where I set this variable to NULL in the class initializer and the segmentation fault here was eliminated. However it is still seg faulting in the ITKv4 Registration.

Vince

Associate Professor
Department of Radiology
0453-D JCP
200 Hawkins Drive
Iowa City, IA 52242
E-mail: [email protected]
Phone: 319-356-8255 Fax: 319-353-6275
Website: http://www.healthcare.uiowa.edu/Radiology

Remove ITKDeprecated use in BRAINSCommonLib, BRAINSSurfaceTools, ImageCalculator, GTRACT and ICCDEF

Checked against 6b15c2b

using the following one-liner

ITK_SRC=/path/to/ITKv4

$ for f in $(ls -1 $ITK_SRC/Modules/Compatibility/Deprecated/include/*.h); do p=$(echo $(basename $f) | cut -d"." -f1); printf "\n"; printf '%.s-' {1..80}; printf "\n"; printf "Searching $p\n"; ack-grep $p; printf "... done\n"; done

Detailed listing:

--------------------------------------------------------------------------------
Searching itkAnalyzeDbh
... done

--------------------------------------------------------------------------------
Searching itkAnalyzeImageIOFactory
BRAINSSurfaceTools/BRAINSSurfaceGeneration/vtkITKArchetypeImageSeriesReader.cxx
82:#include "itkAnalyzeImageIOFactory.h"

ImageCalculator/ImageCalculator.cxx
22:#include "itkAnalyzeImageIOFactory.h"
... done

--------------------------------------------------------------------------------
Searching itkAnalyzeImageIO
BRAINSSurfaceTools/BRAINSSurfaceGeneration/vtkITKArchetypeImageSeriesReader.cxx
82:#include "itkAnalyzeImageIOFactory.h"
83:#include "itkAnalyzeImageIO.h"

GTRACT/Common/itkOrientVectorImageFilter.h
95: * #include "itkAnalyzeImageIO.h"

GTRACT/Common/itkOrientScalarImageFilter.h
95: * #include "itkAnalyzeImageIO.h"

ImageCalculator/ImageCalculator.cxx
22:#include "itkAnalyzeImageIOFactory.h"
... done

--------------------------------------------------------------------------------
Searching itkBalloonForceFilter
... done

--------------------------------------------------------------------------------
Searching itkCompose2DCovariantVectorImageFilter
... done

--------------------------------------------------------------------------------
Searching itkCompose2DVectorImageFilter
... done

--------------------------------------------------------------------------------
Searching itkCompose3DCovariantVectorImageFilter
... done

--------------------------------------------------------------------------------
Searching itkCompose3DVectorImageFilter
... done

--------------------------------------------------------------------------------
Searching itkComposeRGBImageFilter
... done

--------------------------------------------------------------------------------
Searching itkDefaultImageTraits
... done

--------------------------------------------------------------------------------
Searching itkDeformableMesh3DFilter
... done

--------------------------------------------------------------------------------
Searching itkDICOMImageIO2Factory
... done

--------------------------------------------------------------------------------
Searching itkDICOMImageIO2
... done

--------------------------------------------------------------------------------
Searching itkDicomImageIOFactory
... done

--------------------------------------------------------------------------------
Searching itkDicomImageIO
... done

--------------------------------------------------------------------------------
Searching itkDICOMSeriesFileNames
... done

--------------------------------------------------------------------------------
Searching itkImageRegionMultidimensionalSplitter
... done

--------------------------------------------------------------------------------
Searching itkImageRegionSplitter
... done

--------------------------------------------------------------------------------
Searching itkNonThreadedShrinkImageFilter
... done

--------------------------------------------------------------------------------
Searching itkNonUniformBSpline
... done

--------------------------------------------------------------------------------
Searching itkQuaternionOrientationAdapter
... done

--------------------------------------------------------------------------------
Searching itkReflectImageFilter
... done

--------------------------------------------------------------------------------
Searching itkScalarToArrayCastImageFilter
... done

--------------------------------------------------------------------------------
Searching itkScalarVector
... done

--------------------------------------------------------------------------------
Searching itkSemaphore
... done

--------------------------------------------------------------------------------
Searching itkShiftScaleInPlaceImageFilter
... done

--------------------------------------------------------------------------------
Searching itkTransformToDisplacementFieldSource
ICCDEF/IccdefPreprocessor.hxx
32:#include "itkTransformToDisplacementFieldSource.h"

BRAINSCommonLib/TransformToDisplacementField.h
25:#include <itkTransformToDisplacementFieldSource.h>
... done

--------------------------------------------------------------------------------
Searching itkTwoOutputExampleImageFilter
... done

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.