BRAINSia / BRAINSTools

A suite of tools for medical image processing focused on brain analysis
http://brainsia.github.io/BRAINSTools/
Apache License 2.0
113 stars 96 forks source link

Unable to compile with VS2010 Win64 #126

Closed heffter closed 10 years ago

heffter commented 10 years ago

Unable to compile BRAINSTools HEAD with VS2010 Win64:

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
hjmjohnson commented 10 years ago

@Chaircrusher Kent Please attempt to resolve these issues ASAP for BRAINSTools, ANTS, and Teem. If you need me to merge items into ANTS, please let me know.

I know that you can not build on windows, but try to resolve these windows based failures using the notes above on your mac/linux computers. Then request that @heffter rebuild.

Thanks, Hans

heffter commented 10 years ago

You can download VirtualBox (www.virtualbox.org) image from Microsoft for free from here: https://www.modern.ie/en-us/virtualization-tools You can also download VS2010 SP1 and use it for 30 days. Hope it helps.

Chaircrusher commented 10 years ago

I made the changes and they appear to compile. The problem I ran into fixing this is that in trying to compile, the current version of ANTs and ITK clashes with the ANTSRegistrationHelper.

The changes for ANTs: diff --git a/Examples/ImageMath.cxx b/Examples/ImageMath.cxx index c772e68..6bb773e 100644 --- a/Examples/ImageMath.cxx +++ b/Examples/ImageMath.cxx @@ -14877,7 +14877,7 @@ private: { MajorityVoting<3>(argc, argv); }

- ===================================================================

@@ -209,7 +209,7 @@ WeightedVotingLabelFusionImageFilter<TInputImage, TOutputImage> m_PosteriorMap[*sit]->FillBuffer(0.0f); }

@@ -316,8 +316,13 @@ WeightedVotingLabelFusionImageFilter<TInputImage, TOutputImage> const InputImagePixelType _bestMatchPtr = new const InputImagePixelType [m_Modality]; const InputImagePixelType _tMatchPtr = new const InputImagePixelType [m_Modality];

@@ -544,7 +556,7 @@ WeightedVotingLabelFusionImageFilter<TInputImage, TOutputImage>

/**

Chaircrusher commented 10 years ago

OK: So I checked in a change to BRAINSTools, which makes it pull the latest ANTs and ITKv4. I fixed the things mentioned in this issue for Visual Studio 2010, but the latest ANTs was incompatible with the ITKv4 version being pulled by BRAINSTools. So I also had to move to the latest ITKv4 version to get ANTs to compile.

heffter commented 10 years ago

Thank you for the quick fix. Could you also update the Teem library as well?

heffter commented 10 years ago

Can we reopen this issue? It still has not been resolved:

fedorov commented 10 years ago

Tamas, this is not exactly the answer to your concerns, but you could try building BRAINS with ANTS disabled. It is not needed for our purposes. Also, you could look at the configuration options used for BRAINS by Slicer here https://github.com/Slicer/Slicer/blob/master/SuperBuild.cmake#L210-L248. We know that this configuration has no build issues on all three platforms: http://slicer.cdash.org/index.php?project=Slicer4 (correction: looks like the factory machines are using VS2008, not VS2010 that you reported, so not guaranteed the issues are the same). Hope this helps.