https://www.slicer.org/w/api.php?action=feedcontributions&user=Agirault&feedformat=atomSlicer Wiki - User contributions [en]2024-03-28T14:34:16ZUser contributionsMediaWiki 1.33.0https://www.slicer.org/w/index.php?title=Documentation/Nightly/SlicerApplication/SupportedDataFormat&diff=49666Documentation/Nightly/SlicerApplication/SupportedDataFormat2017-02-01T15:16:43Z<p>Agirault: add volumetric mesh support</p>
<hr />
<div><noinclude>{{documentation/versioncheck}}</noinclude><br />
<!-- ---------------------------- --><br />
{{documentation/{{documentation/version}}/slicerapplication-header}}<br />
<!-- ---------------------------- --><br />
=File formats supported by Slicer {{documentation/version}}= <br />
{| style="margin: 1em auto 1em auto; border: 1px solid darkgray;"<br />
|-<br />
!Format<br />
!File Name Extensions<br />
!Read<br />
!Write<br />
!Module<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Scenes<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Data|Data]]<br />
|-<br />
| MRML (Medical Reality Markup Language File)<br />
| .mrml<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|MRML file is a xml-formatted text file with scene metadata and pointers to externally stored data files. See [[Documentation/{{documentation/version}}/Developers/MRML|Data Model]]. Coordinate system: RAS<br />
|-<br />
| MRB (Medical Reality Bundle)<br />
| .mrb, .zip<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes (.mrb extension only)<br />
|MRB is a binary format encapsulating all scene data (bulk data and metadata). Internally it uses zip format. Any .zip file that contains a self-contained data tree including a .mrml file can be opened. Coordinate system: RAS<br />
|-<br />
| Slicer 2 Scene<br />
| .xml<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="#f34a33" align="center"|no<br />
| xml-formatted text file with scene metadata and pointers to externally stored data files. Coordinate system: RAS<br />
|-<br />
| Data collections in XNAT Catalog format (".xcat") or XNAT Archive format (".xar")<br />
| .xcat<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="#f34a33" align="center"|no<br />
|<br />
|-<br />
| Data collections in XNAT Archive format (".xar")<br />
| .xar<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="#f34a33" align="center"|no<br />
|<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Raster Images<br><small>''this includes 2D and 3D images, and more complicated types such as DWI or DTI''</small><br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Volumes|Volumes]]<br />
|-<br />
| [http://medical.nema.org/ DICOM]<br />
| .dcm ...<br />
|bgcolor="LightGreen" align="center"|yes<ref>For a number of dMRI formats we recommend use of the [[Documentation/{{documentation/version}}/Modules/DicomToNrrdConverter|DICOM to NRRD converter]] before loading the data into Slicer.</ref><br />
|bgcolor="#f34a33" align="center"|no<ref>Limited support for writing image volumes in DICOM format is provided by the [[Documentation/{{documentation/version}}/Modules/CreateDICOMSeries|Create DICOM Series]] module. Support of writing DICOM Segmentation Objects is provided by the [[Documentation/{{documentation/version}}/Extensions/Reporting|Reporting extension]]</ref><br />
|[[Documentation/{{documentation/version}}/Modules/DICOM|DICOM]], [[Documentation/{{documentation/version}}/Modules/DicomToNrrdConverter|DICOMToNRRDConverter]], [[Documentation/{{documentation/version}}/Modules/CreateDICOMSeries|CreateDICOMSeries]], [[Documentation/{{documentation/version}}/Extensions/Reporting|Reporting extension]]. Coordinate system: LPS (specified by the DICOM standard)<br />
|-<br />
| [http://teem.sourceforge.net/nrrd/format.html NRRD]<br />
| .nrrd, .nhdr<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: as defined in the file header (usually LPS)<br />
|-<br />
| [http://www.itk.org/Wiki/MetaIO/Documentation MetaImage]<br />
| .mhd, .mha<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: LPS<ref>According to [http://www.itk.org/Wiki/Proposals:Orientation#Current_ITK_Usage_and_sources_of_confusion MetaIO naming scheme] DICOM 'LPS' direction is 'RAI'.</ref> (AnatomicalOrientation in the file header is ignored)<br />
|-<br />
| [http://www.vtk.org/VTK/img/file-formats.pdf VTK]<br />
| .vtk<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: LPS<br />
|-<br />
| [http://www.grahamwideman.com/gw/brain/analyze/formatdoc.htm Analyze]<br />
| .hdr, .img, .img.gz<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| [http://nifti.nimh.nih.gov/nifti-1/ NifTI]<br />
| .nia, .nii, .nii.gz<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| BMP<br />
| .bmp<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| BioRad<br />
| .pic<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| Brains2<br />
| .mask<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| GIPL<br />
| .gipl .gipl.gz<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| JPEG<br />
| .jpg, .jpeg<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| LSM<br />
| .lsm<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| PNG<br />
| .png<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| Stimulate<br />
| .spr<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| TIFF<br />
| .tif, .tiff<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| MGH-NMR<br />
| .mgz<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| [http://en.wikipedia.org/wiki/MRC_(file_format) MRC] Electron Density<br />
| .mrc, .rec<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Models<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Models|Models]]<br />
|-<br />
| [http://www.vtk.org/VTK/img/file-formats.pdf VTK Polygonal Data]<br />
| .vtk<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| [http://www.vtk.org/VTK/img/file-formats.pdf VTK XML Polygonal Data]<br />
| .vtp<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| [http://www.vtk.org/VTK/img/file-formats.pdf VTK Unstructured Grid Data]<br />
| .vtk<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| [http://www.vtk.org/VTK/img/file-formats.pdf VTK XML Unstructured Grid Data]<br />
| .vtp<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| STL<br />
| .stl<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| OBJ<br />
| .obj<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| Freesurfer<br />
| .orig, .inflated, .sphere, .white, .smoothwm, .pial<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="#f34a33" align="center"|no<br />
|<br />
|-<br />
| Others (to be tested)<br />
| .g, .byu<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="#f34a33" align="center"|no<br />
|<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Fiducials<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Markups|Markups]]<br />
|-<br />
| CSV<br />
| .fcsv<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| Text<br />
| .txt<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"|Rulers<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Annotations|Annotations]]<br />
|-<br />
| CSV<br />
| .acsv<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
| Text<br />
| .txt<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| Coordinate system: RAS<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Transforms<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Transforms|Transforms]]<br />
|-<br />
| [http://www.itk.org/ItkSoftwareGuide.pdf ITK Transform]<br />
| .h5<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| For linear, b-spline, grid (displacement field), thin-plate spline, and composite transforms. Coordinate system: LPS<br />
|-<br />
| [http://www.itk.org/ItkSoftwareGuide.pdf ITK Transform]<br />
| .tfm, .txt<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| For linear, b-spline, and thin-plate spline, and composite transforms. Coordinate system: LPS<br />
|-<br />
| [http://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf Matlab MAT-File]<br />
| .mat<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| For linear and b-spline transforms. Coordinate system: LPS<br />
|-<br />
| Displacement field<br />
| .nrrd, .nhdr, .mha, .mhd, .nii, .nii.gz<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
| For grid transform. Coordinate system: LPS<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Transfer Functions<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/VolumeRendering|Volume Rendering]]<br />
|-<br />
| Volume Rendering properties<br />
| .vp<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| Text<br />
| .txt<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Lookup tables<br />
! scope="col" style="border-top: 1px solid grey;"| [[Documentation/{{documentation/version}}/Modules/Colors|Colors]]<br />
|-<br />
| [[Documentation/{{documentation/version}}/Modules/Colors#File_format|Text]]<br />
| .txt, .ctbl<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
! scope="col" colspan="4" style="border-bottom: 1px solid grey;border-top: 1px solid grey;"| Double Arrays<br />
! scope="col" style="border-top: 1px solid grey;"|<br />
|-<br />
| CSV<br />
| .mcsv<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|-<br />
| Text<br />
| .txt<br />
|bgcolor="LightGreen" align="center"|yes<br />
|bgcolor="LightGreen" align="center"|yes<br />
|<br />
|}<br />
<br />
<references/><br />
<br />
= What if your data is not supported? =<br />
<br />
If you have a file of binary data and you know the data is uncompressed and you know the way it is laid out in memory, then one way to load it in Slicer is to create a .nhdr file that points to the binary file.<br />
<br />
A way to get started is to download sample data that is similar to your data (e.g. a CT or MR). Then save that data in .nhdr format and start editing the file to match your data.<br />
<br />
Refer to the [http://teem.sourceforge.net/nrrd NRRD format documentation] to see what the keys mean.<br />
<br />
=References=<br />
* [http://www.vtk.org/Wiki/ITK_File_Formats ITK File Formats]<br />
<br />
<!-- ---------------------------- --><br />
{{documentation/{{documentation/version}}/slicerapplication-footer}}<br />
<!-- ---------------------------- --></div>Agiraulthttps://www.slicer.org/w/index.php?title=Developer_Meetings/20170117&diff=49413Developer Meetings/201701172017-01-17T18:26:14Z<p>Agirault: /* Conclusion */</p>
<hr />
<div><br><br />
{{mbox<br />
| type = style<br />
| text = If you would like to list your topic here, [[Special:UserLogin|create a wiki account]] and [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]<br>You can join the hangout using http://bit.ly/slicer-hangout.<br />
| image= [[File:smile.png|40px]]<br />
}}<br />
<br><br />
<br />
= To Discuss=<br />
* Decision-making policy draft: http://www.na-mic.org/Wiki/index.php/2017_Winter_Project_Week/UpdatingCommunityForums<br />
* ENH: Use RapidJSON instead of JsonCPP for performance improvement: https://github.com/Slicer/Slicer/pull/646<br />
* Add Volumetric mesh support: https://github.com/Slicer/Slicer/pull/647<br />
<br />
= Updates =<br />
* Switching from private hangout (https://hangouts.google.com/hangouts/_/kitware.com/slicer) to public hangout (http://bit.ly/slicer-hangout)<br />
* New windows factory (named overload.kitware) has been submitting Windows nightly without issue in 2.5hr<br />
<br />
= Conclusion =<br />
<br />
* Public Hangout<br />
** Alexis was connected first, but since it was not on Kitware's domain he could not use the chrome device at Kitware's office<br />
** Although Alexis could not use Kitware's chrome devices, users could not join the discussion without his permission. Was it still linked to Kitware's organisation? Or is it because he was the first connected?<br />
** Steve referenced [https://appear.in/ appear.in] and [https://cyclops.io cyclops.io]<br />
<br />
* Volumetric Mesh:<br />
** Finish-up changes listed in MR reviews<br />
** Test with Fiber bundle (Isaiah) to catch any major issues<br />
** Add testing<br />
*** Read/Write, Set/Get (Modules/Loadable/Models/Testing)<br />
*** Integration (run scenario)<br />
** Possibly reference GitHub hosted gif links in commit messages, or just in future updated documentation for the Models module<br />
<br />
* RapidJSON<br />
** Taking JsonCPP out make created some issues? Could have been used in someone's extensions?<br />
** JsonCPP was part of the Slicer 4.6 release, so changes will be not backward-compatible, need to reference it.<br />
** Andras needs JC to give his input for the CMake integration<br />
** Should be integrated in a few more days<br />
<br />
* Forum<br />
** Need to transition from mailing list which becomes obsolete. Main interest in [https://meta.discourse.org/t/discourse-and-slack-or-other-group-chat-apps-like-irc-hipchat-gitter-etc/39630 Discourse]<br />
** See if Kitware shows interest to host an infrastructure for Discourse and transition its main platforms so that:<br />
*** it can be maintained by Kitware (and not SPL, who is busy running a hospital)<br />
*** Slicer can "piggy-back" on the system used by its dependencies (CDash, ITK, VTK...)<br />
*** Could users register just one on Kitware's Discourse domain and join any platform's forum?<br />
** If no interest from Kitware to move in less than 6 months, might look into transitioning independently<br />
** Moderation<br />
*** Will need to assign moderators who would need to dedicate time to this<br />
*** Isaiah is a moderator on a Discourse forum for another project and can give some more inputs</div>Agiraulthttps://www.slicer.org/w/index.php?title=Developer_Meetings/20170117&diff=49410Developer Meetings/201701172017-01-17T18:17:41Z<p>Agirault: /* Conclusion */</p>
<hr />
<div><br><br />
{{mbox<br />
| type = style<br />
| text = If you would like to list your topic here, [[Special:UserLogin|create a wiki account]] and [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]<br>You can join the hangout using http://bit.ly/slicer-hangout.<br />
| image= [[File:smile.png|40px]]<br />
}}<br />
<br><br />
<br />
= To Discuss=<br />
* Decision-making policy draft: http://www.na-mic.org/Wiki/index.php/2017_Winter_Project_Week/UpdatingCommunityForums<br />
* ENH: Use RapidJSON instead of JsonCPP for performance improvement: https://github.com/Slicer/Slicer/pull/646<br />
* Add Volumetric mesh support: https://github.com/Slicer/Slicer/pull/647<br />
<br />
= Updates =<br />
* Switching from private hangout (https://hangouts.google.com/hangouts/_/kitware.com/slicer) to public hangout (http://bit.ly/slicer-hangout)<br />
* New windows factory (named overload.kitware) has been submitting Windows nightly without issue in 2.5hr<br />
<br />
= Conclusion =<br />
<br />
* Public Hangout<br />
** Alexis was connected first, but since it was not on Kitware's domain he could not use the chrome device at Kitware's office<br />
** Although Alexis could not use Kitware's chrome devices, users could not join the discussion without his permission. Was it still linked to Kitware's organisation? Or is it because he was the first connected?<br />
** Steve referenced [https://appear.in/ appear.in] and [https://cyclops.io cyclops.io]<br />
<br />
* Volumetric Mesh:<br />
** Finish-up changes listed in MR reviews<br />
** Test with Fiber bundle (Isaiah) to catch any major issues<br />
** Add testing<br />
*** Read/Write, Set/Get (Modules/Loadable/Models/Testing)<br />
*** Integration (run scenario)<br />
** Possibly reference GitHub hosted gif links in commit messages, or just in future updated documentation for the Models module<br />
<br />
* RapidJSON<br />
** Taking JsonCPP out make created some issues? Could have been used in someone's extensions?<br />
** JsonCPP was part of the Slicer 4.6 release, so changes will be not backward-compatible, need to reference it.<br />
** Andras needs JC to give his input for the CMake integration<br />
** Should be integrated in a few more days<br />
<br />
* Forum<br />
** Need to transition from mailing list which becomes obsolete. Main interest in Discourse<br />
** See if Kitware shows interest to host an infrastructure for Discourse and transition its main platforms so that:<br />
*** it can be maintained by Kitware (and not SPL, who is busy running a hospital)<br />
*** Slicer can "piggy-back" on the system used by its dependencies (CDash, ITK, VTK...)<br />
*** Could users register just one on Kitware's Discourse domain and join any platform's forum?<br />
** If no interest from Kitware to move in less than 6 months, might look into transitioning independently<br />
** Moderation<br />
*** Will need to assign moderators who would need to dedicate time to this<br />
*** Isaiah is a moderator on a Discourse forum for another project and can give some more inputs</div>Agiraulthttps://www.slicer.org/w/index.php?title=Developer_Meetings/20170117&diff=49407Developer Meetings/201701172017-01-17T16:16:02Z<p>Agirault: /* Conclusion */</p>
<hr />
<div><br><br />
{{mbox<br />
| type = style<br />
| text = If you would like to list your topic here, [[Special:UserLogin|create a wiki account]] and [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]<br>You can join the hangout using http://bit.ly/slicer-hangout.<br />
| image= [[File:smile.png|40px]]<br />
}}<br />
<br><br />
<br />
= To Discuss=<br />
* Decision-making policy draft: http://www.na-mic.org/Wiki/index.php/2017_Winter_Project_Week/UpdatingCommunityForums<br />
* ENH: Use RapidJSON instead of JsonCPP for performance improvement: https://github.com/Slicer/Slicer/pull/646<br />
* Add Volumetric mesh support: https://github.com/Slicer/Slicer/pull/647<br />
<br />
= Updates =<br />
* Switching from private hangout (https://hangouts.google.com/hangouts/_/kitware.com/slicer) to public hangout (http://bit.ly/slicer-hangout)<br />
* New windows factory (named overload.kitware) has been submitting Windows nightly without issue in 2.5hr<br />
<br />
= Conclusion =<br />
* Volumetric Mesh:<br />
** Finish-up changes listed in MR reviews<br />
** Test with Fiber bundle (Isaiah) to catch any major issues<br />
** Add testing<br />
*** Read/Write, Set/Get (Modules/Loadable/Models/Testing)<br />
*** Integration (run scenario)<br />
** Possibly reference GitHub hosted gif links in commit messages, or just in future updated documentation for the Models module<br />
<br />
* RapidJSON<br />
** Taking JsonCPP out make created some issues? Could have been used in someone's extensions?<br />
** JsonCPP was part of the Slicer 4.6 release, so changes will be not backward-compatible, need to reference it.<br />
** Andras needs JC to give his input for the CMake integration<br />
** Should be integrated in a few more days<br />
<br />
* Forum<br />
** Need to transition from mailing list which becomes obsolete. Main interest in Discourse<br />
** See if Kitware shows interest to host an infrastructure for Discourse and transition its main platforms so that:<br />
*** it can be maintained by Kitware (and not SPL, who is busy running a hospital)<br />
*** Slicer can "piggy-back" on the system used by its dependencies (CDash, ITK, VTK...)<br />
*** Could users register just one on Kitware's Discourse domain and join any platform's forum?<br />
** If no interest from Kitware to move in less than 6 months, might look into transitioning independently<br />
** Moderation<br />
*** Will need to assign moderators who would need to dedicate time to this<br />
*** Isaiah is a moderator on a Discourse forum for another project and can give some more inputs</div>Agiraulthttps://www.slicer.org/w/index.php?title=Developer_Meetings/20170117&diff=49404Developer Meetings/201701172017-01-17T16:14:59Z<p>Agirault: /* Conclusion */</p>
<hr />
<div><br><br />
{{mbox<br />
| type = style<br />
| text = If you would like to list your topic here, [[Special:UserLogin|create a wiki account]] and [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]<br>You can join the hangout using http://bit.ly/slicer-hangout.<br />
| image= [[File:smile.png|40px]]<br />
}}<br />
<br><br />
<br />
= To Discuss=<br />
* Decision-making policy draft: http://www.na-mic.org/Wiki/index.php/2017_Winter_Project_Week/UpdatingCommunityForums<br />
* ENH: Use RapidJSON instead of JsonCPP for performance improvement: https://github.com/Slicer/Slicer/pull/646<br />
* Add Volumetric mesh support: https://github.com/Slicer/Slicer/pull/647<br />
<br />
= Updates =<br />
* Switching from private hangout (https://hangouts.google.com/hangouts/_/kitware.com/slicer) to public hangout (http://bit.ly/slicer-hangout)<br />
* New windows factory (named overload.kitware) has been submitting Windows nightly without issue in 2.5hr<br />
<br />
= Conclusion =<br />
* Volumetric Mesh:<br />
** Finish-up changes listed in MR reviews<br />
** Test with Fiber bundle (Isaiah) to catch any major issues<br />
** Add testing<br />
*** Read/Write, Set/Get (Modules/Loadable/Models/Testing)<br />
*** Integration (run scenario)<br />
** Possibly reference GitHub hosted gif links in commit messages, or just in future updated documentation for the Models module<br />
<br />
* RapidJSON<br />
** Taking JsonCPP out make created some issues? Could have been used in someone's extensions?<br />
** JsonCPP was part of the Slicer 4.6 release, so changes will be not backward-compatible, need to reference it.<br />
** Andras needs JC to give his input for the CMake integration<br />
** Should be integrated in a few more days<br />
<br />
* Forum<br />
** Need to transition from mailing list which becomes obsolete. Main interest in Discourse<br />
** See if Kitware shows interest to maintain an infrastructure for Discourse and transition its main platforms so that:<br />
*** it can be maintained by Kitware (and not SPL, who is busy running a hospital)<br />
*** Slicer can "piggy-back" on the system used by its dependencies (CDash, ITK, VTK...)<br />
*** Could users register just one on Kitware's Discourse domain and join any platform's forum?<br />
** If no interest from Kitware to move in less than 6 months, might look into transitioning independently<br />
** Moderation<br />
*** Will need to assign moderators who would need to dedicate time to this<br />
*** Isaiah is a moderator on a Discourse forum for another project and can give some more inputs</div>Agiraulthttps://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_Instructions/Prerequisites&diff=49207Documentation/Nightly/Developers/Build Instructions/Prerequisites2016-12-14T17:46:24Z<p>Agirault: /* Mac OSX 10.12 (Sierra) */</p>
<hr />
<div><noinclude>{{documentation/versioncheck}}</noinclude><br />
__TOC__<br />
<br />
== PREREQUISITES ==<br />
<br><br />
<!--<br />
Please check that the following tools are installed on your machine.<br />
<br />
We try to keep current with the most recent releases of these prerequisites, but sometimes it's critical to use the exact versions specified here. If you run into issues please do whatever you can to find a combination that works or contact the developer mailing list for suggestions.<br />
<br />
<br><br />
{{mbox<br />
| type = protection<br />
| text = Qt libraries are '''required'''. Consider reading [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt|Qt requirements]].<br />
| image= [[{{tool|logo|qt}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = CMake is '''required'''.<br />
| image= [[{{tool|logo|cmake}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Git is '''required'''.<br />
| image= [[{{tool|logo|git}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = SVN is '''required'''.<br />
| image= [[{{tool|logo|svn}}|x40px]]<br />
}}<br />
<br />
<br><br />
--><br />
The prerequisites listed below are required to be able to configure/build/package/test Slicer.<br />
<br />
=== Linux ===<br />
* [{{tool|download|cmake}} CMake] >= 3.7-rc02<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
* Qt 4.8.6. <small>See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Linux|here]]. See some history [http://na-mic.org/Mantis/view.php?id=3325#bugnotes here] (Note that any version >= Qt 4.7.4 can be used only for Ubuntu < 12.04)</small><br />
<br />
==== Debian ====<br />
<br />
* Debian squeeze/wheezy/testing(jessie) users, start by pasting the following lines in a terminal<br />
sudo apt-get install subversion git-core git-svn<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libosmesa6-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
sudo apt-get install cmake<br />
sudo apt-get install qt-sdk<br />
<br />
<hr><br />
<br />
<br />
==== Ubuntu ====<br />
<br />
===== Common Prerequisites =====<br />
<br />
<br />
sudo apt-get install subversion git-core git-svn<br />
<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
<br />
sudo apt-get install libosmesa6-dev # Only for Ubuntu < 14.04.3<br />
<br />
{{remark|red|On Ubuntu 14.04.3 LTS, attempting to install <tt>libosmesa6-dev</tt> results in an error.<pre><br />
The following packages have unmet dependencies:<br />
libosmesa6-dev : Depends: libosmesa6 (= 10.1.3-0ubuntu0.4) but it is not going to be installed<br />
E: Unable to correct problems, you have held broken packages.<br />
</pre><br />
For more details, see [https://bugs.launchpad.net/ubuntu/+source/mesa-lts-utopic/+bug/1424059 Bug 1424059].}}<br />
<br />
{{remark|green|Slicer compiles successfully without that package, but <tt>VTK_OPENGL_HAS_OSMESA</tt> is disabled.}}<br />
<br />
===== CMake =====<br />
<br />
<ol><br />
<li>Open a terminal and copy the command reported below</li><br />
<li>Download stable version of CMake and extract the archive:<br />
<pre><br />
mkdir ~/Support && cd ~/Support<br />
curl -O https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz<br />
tar -xzvf cmake-3.5.2-Linux-x86_64.tar.gz<br />
</pre><br />
</li><br />
<li>Create symbolic links into <code>~/bin</code><br />
<pre><br />
mkdir -p ~/bin<br />
for name in cmake ctest cpack ccmake cmake-gui; do<br />
ln -s ~/Support/cmake-3.5.2-Linux-x86_64/bin/$name ~/bin/$name<br />
done<br />
</pre><br />
</li><br />
</ol><br />
<br />
{{remark|red|You <b>MUST</b> download the standard CMake binary because the distributed version of CMake cannot be used to build slicer.<br><br />
See [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_distributed_CMake_can_not_be_used_on_Ubuntu_12.04_and_above_.3F|here]] for more details.}}<br />
<br />
===== Qt =====<br />
<br />
'''Ubuntu 14.04 and above''': Qt 4 == 4.8.7 MUST be used.<br />
<br />
See https://github.com/jcfr/qt-easy-build/blob/4.8.7/Build-qt.txt<br />
<br />
<br />
<br />
'''Ubuntu 12.04, 12.10, 13.04 and 13.10''': Qt 4 >= 4.8.5 MUST be used.<br />
<br />
<pre><br />
cd ~/Support # This is where we will build Qt and dependent libraries<br />
<br />
# Keep track of our working directory<br />
cwd=$(pwd)<br />
<br />
# This will download, then build zlib and openssl in the current folder<br />
rm -f get-and-build-openssl-for-slicer.sh<br />
wget https://gist.githubusercontent.com/jcfr/9513568/raw/21f4e4cabca5ad03435ecc17ab546dab5e2c1a2f/get-and-build-openssl-for-slicer.sh<br />
chmod u+x get-and-build-openssl-for-slicer.sh <br />
./get-and-build-openssl-for-slicer.sh <br />
<br />
# This will download Qt source in the current folder<br />
wget http://packages.kitware.com/download/item/6175/qt-everywhere-opensource-src-4.8.6.tar.gz<br />
md5=`md5sum ./qt-everywhere-opensource-src-4.8.6.tar.gz | awk '{ print $1 }'` &&<br />
[ $md5 == "2edbe4d6c2eff33ef91732602f3518eb" ] || echo "MD5 mismatch. Problem downloading Qt"<br />
<br />
# This will configure and build Qt in RELEASE against the zlib and openssl previously built<br />
tar -xzvf qt-everywhere-opensource-src-4.8.6.tar.gz<br />
mv qt-everywhere-opensource-src-4.8.6 qt-everywhere-opensource-release-src-4.8.6<br />
mkdir qt-everywhere-opensource-release-build-4.8.6<br />
cd qt-everywhere-opensource-release-src-4.8.6<br />
./configure -prefix $cwd/qt-everywhere-opensource-release-build-4.8.6 \<br />
-release \<br />
-opensource -confirm-license \<br />
-no-qt3support \<br />
-webkit \<br />
-nomake examples -nomake demos \<br />
-openssl -I $cwd/openssl-1.0.1e/include -L $cwd/openssl-1.0.1e \<br />
&& make -j7 && make install<br />
</pre><br />
<br />
For more details, consider reading the FAQ entry: [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_Qt_4_.3E.3D_4.8.5_should_be_used_on_Ubuntu_12.04_and_above_.3F|Why Qt 4 >= 4.8.5 should be used on Ubuntu 12.04 and above ?]]<br />
<br />
<hr><br />
<br />
<br />
==== CentOS ====<br />
*CentOS user type:<br />
yum install make gcc-c++ libX11-devel libXt-devel libXrender-devel libXext-devel libGLU-devel mesa-libOSMesa-devel mesa-libGL-devel mesa-libGLU-devel ncurses<br />
<br />
<!--<br />
Todo: This will have to be added in FAQ: Troubleshoot section<br />
''glx-utils'' provides ''glxgears'' that can be used to test rendering<br />
--><br />
<br />
=== MacOSX ===<br />
<br />
* El Capitan is what most developers use.<br />
* CMake 3.7-rc02 is recommended.<br />
<br />
====MacOSX 10.9.4 (Mavericks)====<br />
<br />
''' (1) Make sure to install this update: http://support.apple.com/kb/DL1754'''<br />
<br />
''' (2) Use CMake 3.0.1 - it is known to be working and is supported''' (if you want to use CMake already installed on your system, 2.8.12.2 is known to work on Mac OS X 10.9.5)<br />
<br />
* Mac Os X >= 10.5 (Leopard)<br />
* [{{tool|download|cmake}} CMake] >= 2.8.9<br />
** For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) and/or recent XCode >= 4.5.X - [{{tool|download|cmake}} CMake] >= 2.8.11 is required. See http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
<!-- Waiting for the official release, get the release candidate rc1 [http://www.cmake.org/files/v2.8/cmake-2.8.11-rc1-Darwin64-universal.tar.gz here]. For explanation, see [[Documentation/{{documentation/version}}/Developers/Build_Instructions#ld:_framework_not_found_QtWebKit|here]] and [[Documentation/{{documentation/version}}/Developers/Build_Instructions#On_MacOSX_10.8.2C_CMake_hangs_forever|here]]. These versions are also known to work: exact version 20130121-g92bd8 [http://www.cmake.org/files/dev/cmake-2.8.10.20130121-g92bd8-Darwin-universal.tar.gz here] (or version >= 2.8.10.20130220 [http://www.cmake.org/files/dev/?C=M;O=D here]).<br />
--><br />
<br />
$ curl -O http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
$ tar -xzvf cmake-2.8.11-Darwin64-universal.tar.gz --strip-components=1<br />
<br />
$ CMake\ 2.8-11.app/Contents/bin/cmake --version<br />
cmake version 2.8.11<br />
<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.9<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.6.5<br />
--><br />
* XCode (for the SDK libs)<br />
** After installing XCode, install XCode command line developer tools: <br />
<pre><br />
xcode-select --install<br />
</pre><br />
* XQuartz - For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
* Qt 4 >= 4.8.5. We recommend you install the following two packages:<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1.dmg qt-opensource-mac-4.8.6-1.dmg]<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1-debug-libs.dmg qt-opensource-mac-4.8.6-1-debug-libs.dmg]<br />
** For more details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Mac|here]]<br />
<!--<br />
** Newer Xcode versions (e.g. 4.3.2) use clang as the default compiler and '''clang is not compatible with ITK version 3'''. You should use ITK version 4 with recent versions of Xcode.<br />
** Xcode with gcc should ork with either version of ITK.<br />
** OS X Mountain Lion: In Xcode 4.5 you now need to install command line tools (no longer included by default). Install within Xcode under the Xcode->Preferences->Downloads tab (otherwise git svn will give errors). Then you will need to install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
--><br />
<br />
====Mac OSX 10.11 (El Capitan)====<br />
<br />
XCode up to version 7 is known to work for Slicer compilation. XCode 8 breaks things on several levels for now. <br />
Remember to install XCode command line tools (see above) if a reinstall for XCode is needed. <br />
<br />
The standard Qt4 installers fail on this version and the 4.8.6 source code won't build. But [http://slicer-devel.65872.n3.nabble.com/incompatible-qt-4-8-6-with-OS-X-El-Capitan-td4035551.html as described on the slicer-devel mailing list] it is possible to install the [https://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch homebrew version of qt4 which patches it to work on El Capitan] (see below).<br />
<br />
* Install the '''OS''', '''Xcode''', and '''XQuartz''' (see MacOSX 10.10 above)<br />
* Install '''Qt4''' by running the following two commands:<br />
<pre><br />
brew install qt4<br />
xcode-select --install<br />
</pre><br />
* TCL does not build correctly on El Capitan as of 2015-12-03, so when building Slicer turn `Slicer_USE_PYTHONQT_WITH_TCL` off.<br />
<br />
==== Mac OSX 10.12 (Sierra) ====<br />
<br />
Similar to 10.11 (El Capitan), there are new issues with Qt4 (caused by Phonon).<br />
The GitHub user Cartr [https://github.com/Homebrew/homebrew-core/pull/5216 offered a patch to the brew team], and even though it was not integrated (the homebrew team decided to stop patching their recipe to encourage people to use Qt5), he [https://github.com/cartr/homebrew-qt4 turned his formula into a tap] that can be installed (see below).<br />
<br />
Follow instructions for 10.11 ''(Installing Xcode, XQuartz, run without TCL)'' but install '''Qt4''' like shown below instead:<br />
<pre><br />
brew install cartr/qt4/qt<br />
xcode-select --install<br />
</pre><br />
<br />
Confirmed with Xcode: Version 8.1 (8B62) and cmake version 3.4.20151021-g8fbc8e<br />
<!--<br />
DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF ../Slicer<br />
make -j `sysctl -n hw.ncpu`<br />
--><br />
<br />
=== Windows ===<br />
<br />
==== Common Prerequisites ====<br />
* [{{tool|download|cmake}} CMake] >= 3.0 (3.7.1 recommended)<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.10<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.7.10<br />
* [https://code.google.com/p/msysgit/downloads/list?can=3 ''Git-X.X.X-preview2013XXXX.exe''] recommended.<br />
--><br />
<!--<br />
** Use of [http://code.google.com/p/tortoisegit/ TortoiseGit] is optional.<br />
--><br />
** {{note}}For convenience, you could update the PATH variable so that ''git'' can be automatically discovered when configuring Slicer. If not, you will have to specify the GIT_EXECUTABLE at configure time.<br />
<br />
* [http://www.sliksvn.com/en/download SlikSvn] <!-- or [http://www.cygwin.com cygwin's svn client]-->. If using TortoiseSVN (versions that support command line tools), make sure you install Command line tools (disabled by default)<br />
<br />
* NSIS (optional): Needed if packaging Slicer - Click [http://nsis.sourceforge.net/Download here] to download.<br />
<br />
* Qt: See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Windows|here]].<br />
<br />
==== Tested and recommended build environment ====<br />
<br />
* [https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx Visual Studio 2013] with Update 5, as of [https://github.com/Slicer/Slicer/commit/71602609ce2ae5e473ece392500825ca96213371 commit 7160260]: Slicer compilation is successful, with some caveats.<br />
** CMake >= 3.3.1<br />
** Build Qt 4.8.7 with SSL support using [https://github.com/jcfr/qt-easy-build/tree/4.8.7 qt-easy-build].<br />
** For Debug mode, disable <code>Slicer_USE_SimpleITK</code> in CMake.<br />
<br />
==== Experimental/deprecated build environments ====<br />
<br />
* VS2008 (deprecated)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2008-editions Microsoft Visual Studio 9 2008] (Any edition). [http://go.microsoft.com/?linkid=7729279 VS Express 2008 with SP1 direct link] (functional as of Jan 11, 2014)<br />
** Make sure to install SP1: Click [http://www.microsoft.com/download/en/details.aspx?id=10986 here] to download SP1 and click [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2012/008206.html here] to understand the motivation.<br />
*** Make sure to patch VS2008 using the script [https://gist.github.com/jcfr/3c7bef3f8b32f9f6ad4b fix-vc9-redist-manifests.ps1]<br />
* VS2010 (experimental, may not work)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2010-editions Microsoft Visual Studio 2010] (Any edition)<br />
** Make sure to build or install:<br />
*** Qt 4.8 <br />
** Make sure to install:<br />
*** SP1. Click [http://www.microsoft.com/download/en/details.aspx?id=23691 here] to download SP1 and click [http://developer.qt.nokia.com/faq/answer/why_do_all_qt_4.7_applications_crash_when_using_windows_7_x64_w_vs_2010 here] to understand the motivation.<br />
*** SP1 Compiler update. Click [https://www.microsoft.com/download/en/details.aspx?id=4422 here] to download and [http://slicer-devel.65872.n3.nabble.com/Windows-7-64Bits-Slicer-4-Build-with-VC-2010-problem-tt3730524.html#a3731661 here] to understand the motivation.<br />
<!-- JC: This links shouldn't be here: 1) Since this the developer section, it's assumed Visual Studio is installed. 2) The Dll are distributed within Slicer package --><br />
<!-- *** Optional: "Microsoft Visual C++ 2010 SP1 Redistributable Package". Click [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x64] download, or [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x86] download. [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 x86 (32bit) for VS 2008] --><br />
* VS2012 (experimental)<br />
** Use a desktop version such as [http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop Visual Studio 2012 Express <b>for Windows Desktop</b>] and remember [http://www.microsoft.com/en-us/download/details.aspx?id=38188 Visual Studio 2012 Update 2]). Do <b>not</b> use Visual Studio Express 2012 <em>for Windows 8</em>. You must install [http://msdn.microsoft.com/en-us/library/ms717422.aspx Windows SDK], otherwise CMake will not even find the C compiler during configure. In CMake, choose <tt>Visual Studio 11 Win64</tt> as generator.<br />
* Cygwin (untested)<br />
** Cygwin suite (building with cygwin gcc not supported, but the cygwin shell environment can be used to run git, svn, etc).</div>Agiraulthttps://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_Instructions/Prerequisites&diff=49204Documentation/Nightly/Developers/Build Instructions/Prerequisites2016-12-14T17:44:21Z<p>Agirault: Fix qt4 install on Sierra</p>
<hr />
<div><noinclude>{{documentation/versioncheck}}</noinclude><br />
__TOC__<br />
<br />
== PREREQUISITES ==<br />
<br><br />
<!--<br />
Please check that the following tools are installed on your machine.<br />
<br />
We try to keep current with the most recent releases of these prerequisites, but sometimes it's critical to use the exact versions specified here. If you run into issues please do whatever you can to find a combination that works or contact the developer mailing list for suggestions.<br />
<br />
<br><br />
{{mbox<br />
| type = protection<br />
| text = Qt libraries are '''required'''. Consider reading [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt|Qt requirements]].<br />
| image= [[{{tool|logo|qt}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = CMake is '''required'''.<br />
| image= [[{{tool|logo|cmake}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Git is '''required'''.<br />
| image= [[{{tool|logo|git}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = SVN is '''required'''.<br />
| image= [[{{tool|logo|svn}}|x40px]]<br />
}}<br />
<br />
<br><br />
--><br />
The prerequisites listed below are required to be able to configure/build/package/test Slicer.<br />
<br />
=== Linux ===<br />
* [{{tool|download|cmake}} CMake] >= 3.7-rc02<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
* Qt 4.8.6. <small>See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Linux|here]]. See some history [http://na-mic.org/Mantis/view.php?id=3325#bugnotes here] (Note that any version >= Qt 4.7.4 can be used only for Ubuntu < 12.04)</small><br />
<br />
==== Debian ====<br />
<br />
* Debian squeeze/wheezy/testing(jessie) users, start by pasting the following lines in a terminal<br />
sudo apt-get install subversion git-core git-svn<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libosmesa6-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
sudo apt-get install cmake<br />
sudo apt-get install qt-sdk<br />
<br />
<hr><br />
<br />
<br />
==== Ubuntu ====<br />
<br />
===== Common Prerequisites =====<br />
<br />
<br />
sudo apt-get install subversion git-core git-svn<br />
<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
<br />
sudo apt-get install libosmesa6-dev # Only for Ubuntu < 14.04.3<br />
<br />
{{remark|red|On Ubuntu 14.04.3 LTS, attempting to install <tt>libosmesa6-dev</tt> results in an error.<pre><br />
The following packages have unmet dependencies:<br />
libosmesa6-dev : Depends: libosmesa6 (= 10.1.3-0ubuntu0.4) but it is not going to be installed<br />
E: Unable to correct problems, you have held broken packages.<br />
</pre><br />
For more details, see [https://bugs.launchpad.net/ubuntu/+source/mesa-lts-utopic/+bug/1424059 Bug 1424059].}}<br />
<br />
{{remark|green|Slicer compiles successfully without that package, but <tt>VTK_OPENGL_HAS_OSMESA</tt> is disabled.}}<br />
<br />
===== CMake =====<br />
<br />
<ol><br />
<li>Open a terminal and copy the command reported below</li><br />
<li>Download stable version of CMake and extract the archive:<br />
<pre><br />
mkdir ~/Support && cd ~/Support<br />
curl -O https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz<br />
tar -xzvf cmake-3.5.2-Linux-x86_64.tar.gz<br />
</pre><br />
</li><br />
<li>Create symbolic links into <code>~/bin</code><br />
<pre><br />
mkdir -p ~/bin<br />
for name in cmake ctest cpack ccmake cmake-gui; do<br />
ln -s ~/Support/cmake-3.5.2-Linux-x86_64/bin/$name ~/bin/$name<br />
done<br />
</pre><br />
</li><br />
</ol><br />
<br />
{{remark|red|You <b>MUST</b> download the standard CMake binary because the distributed version of CMake cannot be used to build slicer.<br><br />
See [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_distributed_CMake_can_not_be_used_on_Ubuntu_12.04_and_above_.3F|here]] for more details.}}<br />
<br />
===== Qt =====<br />
<br />
'''Ubuntu 14.04 and above''': Qt 4 == 4.8.7 MUST be used.<br />
<br />
See https://github.com/jcfr/qt-easy-build/blob/4.8.7/Build-qt.txt<br />
<br />
<br />
<br />
'''Ubuntu 12.04, 12.10, 13.04 and 13.10''': Qt 4 >= 4.8.5 MUST be used.<br />
<br />
<pre><br />
cd ~/Support # This is where we will build Qt and dependent libraries<br />
<br />
# Keep track of our working directory<br />
cwd=$(pwd)<br />
<br />
# This will download, then build zlib and openssl in the current folder<br />
rm -f get-and-build-openssl-for-slicer.sh<br />
wget https://gist.githubusercontent.com/jcfr/9513568/raw/21f4e4cabca5ad03435ecc17ab546dab5e2c1a2f/get-and-build-openssl-for-slicer.sh<br />
chmod u+x get-and-build-openssl-for-slicer.sh <br />
./get-and-build-openssl-for-slicer.sh <br />
<br />
# This will download Qt source in the current folder<br />
wget http://packages.kitware.com/download/item/6175/qt-everywhere-opensource-src-4.8.6.tar.gz<br />
md5=`md5sum ./qt-everywhere-opensource-src-4.8.6.tar.gz | awk '{ print $1 }'` &&<br />
[ $md5 == "2edbe4d6c2eff33ef91732602f3518eb" ] || echo "MD5 mismatch. Problem downloading Qt"<br />
<br />
# This will configure and build Qt in RELEASE against the zlib and openssl previously built<br />
tar -xzvf qt-everywhere-opensource-src-4.8.6.tar.gz<br />
mv qt-everywhere-opensource-src-4.8.6 qt-everywhere-opensource-release-src-4.8.6<br />
mkdir qt-everywhere-opensource-release-build-4.8.6<br />
cd qt-everywhere-opensource-release-src-4.8.6<br />
./configure -prefix $cwd/qt-everywhere-opensource-release-build-4.8.6 \<br />
-release \<br />
-opensource -confirm-license \<br />
-no-qt3support \<br />
-webkit \<br />
-nomake examples -nomake demos \<br />
-openssl -I $cwd/openssl-1.0.1e/include -L $cwd/openssl-1.0.1e \<br />
&& make -j7 && make install<br />
</pre><br />
<br />
For more details, consider reading the FAQ entry: [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_Qt_4_.3E.3D_4.8.5_should_be_used_on_Ubuntu_12.04_and_above_.3F|Why Qt 4 >= 4.8.5 should be used on Ubuntu 12.04 and above ?]]<br />
<br />
<hr><br />
<br />
<br />
==== CentOS ====<br />
*CentOS user type:<br />
yum install make gcc-c++ libX11-devel libXt-devel libXrender-devel libXext-devel libGLU-devel mesa-libOSMesa-devel mesa-libGL-devel mesa-libGLU-devel ncurses<br />
<br />
<!--<br />
Todo: This will have to be added in FAQ: Troubleshoot section<br />
''glx-utils'' provides ''glxgears'' that can be used to test rendering<br />
--><br />
<br />
=== MacOSX ===<br />
<br />
* El Capitan is what most developers use.<br />
* CMake 3.7-rc02 is recommended.<br />
<br />
====MacOSX 10.9.4 (Mavericks)====<br />
<br />
''' (1) Make sure to install this update: http://support.apple.com/kb/DL1754'''<br />
<br />
''' (2) Use CMake 3.0.1 - it is known to be working and is supported''' (if you want to use CMake already installed on your system, 2.8.12.2 is known to work on Mac OS X 10.9.5)<br />
<br />
* Mac Os X >= 10.5 (Leopard)<br />
* [{{tool|download|cmake}} CMake] >= 2.8.9<br />
** For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) and/or recent XCode >= 4.5.X - [{{tool|download|cmake}} CMake] >= 2.8.11 is required. See http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
<!-- Waiting for the official release, get the release candidate rc1 [http://www.cmake.org/files/v2.8/cmake-2.8.11-rc1-Darwin64-universal.tar.gz here]. For explanation, see [[Documentation/{{documentation/version}}/Developers/Build_Instructions#ld:_framework_not_found_QtWebKit|here]] and [[Documentation/{{documentation/version}}/Developers/Build_Instructions#On_MacOSX_10.8.2C_CMake_hangs_forever|here]]. These versions are also known to work: exact version 20130121-g92bd8 [http://www.cmake.org/files/dev/cmake-2.8.10.20130121-g92bd8-Darwin-universal.tar.gz here] (or version >= 2.8.10.20130220 [http://www.cmake.org/files/dev/?C=M;O=D here]).<br />
--><br />
<br />
$ curl -O http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
$ tar -xzvf cmake-2.8.11-Darwin64-universal.tar.gz --strip-components=1<br />
<br />
$ CMake\ 2.8-11.app/Contents/bin/cmake --version<br />
cmake version 2.8.11<br />
<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.9<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.6.5<br />
--><br />
* XCode (for the SDK libs)<br />
** After installing XCode, install XCode command line developer tools: <br />
<pre><br />
xcode-select --install<br />
</pre><br />
* XQuartz - For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
* Qt 4 >= 4.8.5. We recommend you install the following two packages:<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1.dmg qt-opensource-mac-4.8.6-1.dmg]<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1-debug-libs.dmg qt-opensource-mac-4.8.6-1-debug-libs.dmg]<br />
** For more details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Mac|here]]<br />
<!--<br />
** Newer Xcode versions (e.g. 4.3.2) use clang as the default compiler and '''clang is not compatible with ITK version 3'''. You should use ITK version 4 with recent versions of Xcode.<br />
** Xcode with gcc should ork with either version of ITK.<br />
** OS X Mountain Lion: In Xcode 4.5 you now need to install command line tools (no longer included by default). Install within Xcode under the Xcode->Preferences->Downloads tab (otherwise git svn will give errors). Then you will need to install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
--><br />
<br />
====Mac OSX 10.11 (El Capitan)====<br />
<br />
XCode up to version 7 is known to work for Slicer compilation. XCode 8 breaks things on several levels for now. <br />
Remember to install XCode command line tools (see above) if a reinstall for XCode is needed. <br />
<br />
The standard Qt4 installers fail on this version and the 4.8.6 source code won't build. But [http://slicer-devel.65872.n3.nabble.com/incompatible-qt-4-8-6-with-OS-X-El-Capitan-td4035551.html as described on the slicer-devel mailing list] it is possible to install the [https://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch homebrew version of qt4 which patches it to work on El Capitan] (see below).<br />
<br />
* Install the '''OS''', '''Xcode''', and '''XQuartz''' (see MacOSX 10.10 above)<br />
* Install '''Qt4''' by running the following two commands:<br />
<pre><br />
brew install qt4<br />
xcode-select --install<br />
</pre><br />
* TCL does not build correctly on El Capitan as of 2015-12-03, so when building Slicer turn `Slicer_USE_PYTHONQT_WITH_TCL` off.<br />
<br />
==== Mac OSX 10.12 (Sierra) ====<br />
<br />
Similar to 10.11 (El Capitan), there are new issues with Qt4 (caused by Phonon).<br />
The GitHub user Cartr [https://github.com/Homebrew/homebrew-core/pull/5216 offered a patch to the brew team], and even though it was not integrated (the homebrew team decided to stop patching their recipe to encourage people to use Qt5), he turned his formula into a [https://github.com/cartr/homebrew-qt4 tap] that can be installed (see below).<br />
<br />
Follow instructions for 10.11 ''(Installing Xcode, XQuartz, run without TCL)'' but install '''Qt4''' like shown below instead:<br />
<pre><br />
brew install cartr/qt4/qt<br />
xcode-select --install<br />
</pre><br />
<br />
Confirmed with Xcode: Version 8.1 (8B62) and cmake version 3.4.20151021-g8fbc8e<br />
<!--<br />
DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF ../Slicer<br />
make -j `sysctl -n hw.ncpu`<br />
--><br />
<br />
=== Windows ===<br />
<br />
==== Common Prerequisites ====<br />
* [{{tool|download|cmake}} CMake] >= 3.0 (3.7.1 recommended)<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.10<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.7.10<br />
* [https://code.google.com/p/msysgit/downloads/list?can=3 ''Git-X.X.X-preview2013XXXX.exe''] recommended.<br />
--><br />
<!--<br />
** Use of [http://code.google.com/p/tortoisegit/ TortoiseGit] is optional.<br />
--><br />
** {{note}}For convenience, you could update the PATH variable so that ''git'' can be automatically discovered when configuring Slicer. If not, you will have to specify the GIT_EXECUTABLE at configure time.<br />
<br />
* [http://www.sliksvn.com/en/download SlikSvn] <!-- or [http://www.cygwin.com cygwin's svn client]-->. If using TortoiseSVN (versions that support command line tools), make sure you install Command line tools (disabled by default)<br />
<br />
* NSIS (optional): Needed if packaging Slicer - Click [http://nsis.sourceforge.net/Download here] to download.<br />
<br />
* Qt: See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Windows|here]].<br />
<br />
==== Tested and recommended build environment ====<br />
<br />
* [https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx Visual Studio 2013] with Update 5, as of [https://github.com/Slicer/Slicer/commit/71602609ce2ae5e473ece392500825ca96213371 commit 7160260]: Slicer compilation is successful, with some caveats.<br />
** CMake >= 3.3.1<br />
** Build Qt 4.8.7 with SSL support using [https://github.com/jcfr/qt-easy-build/tree/4.8.7 qt-easy-build].<br />
** For Debug mode, disable <code>Slicer_USE_SimpleITK</code> in CMake.<br />
<br />
==== Experimental/deprecated build environments ====<br />
<br />
* VS2008 (deprecated)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2008-editions Microsoft Visual Studio 9 2008] (Any edition). [http://go.microsoft.com/?linkid=7729279 VS Express 2008 with SP1 direct link] (functional as of Jan 11, 2014)<br />
** Make sure to install SP1: Click [http://www.microsoft.com/download/en/details.aspx?id=10986 here] to download SP1 and click [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2012/008206.html here] to understand the motivation.<br />
*** Make sure to patch VS2008 using the script [https://gist.github.com/jcfr/3c7bef3f8b32f9f6ad4b fix-vc9-redist-manifests.ps1]<br />
* VS2010 (experimental, may not work)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2010-editions Microsoft Visual Studio 2010] (Any edition)<br />
** Make sure to build or install:<br />
*** Qt 4.8 <br />
** Make sure to install:<br />
*** SP1. Click [http://www.microsoft.com/download/en/details.aspx?id=23691 here] to download SP1 and click [http://developer.qt.nokia.com/faq/answer/why_do_all_qt_4.7_applications_crash_when_using_windows_7_x64_w_vs_2010 here] to understand the motivation.<br />
*** SP1 Compiler update. Click [https://www.microsoft.com/download/en/details.aspx?id=4422 here] to download and [http://slicer-devel.65872.n3.nabble.com/Windows-7-64Bits-Slicer-4-Build-with-VC-2010-problem-tt3730524.html#a3731661 here] to understand the motivation.<br />
<!-- JC: This links shouldn't be here: 1) Since this the developer section, it's assumed Visual Studio is installed. 2) The Dll are distributed within Slicer package --><br />
<!-- *** Optional: "Microsoft Visual C++ 2010 SP1 Redistributable Package". Click [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x64] download, or [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x86] download. [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 x86 (32bit) for VS 2008] --><br />
* VS2012 (experimental)<br />
** Use a desktop version such as [http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop Visual Studio 2012 Express <b>for Windows Desktop</b>] and remember [http://www.microsoft.com/en-us/download/details.aspx?id=38188 Visual Studio 2012 Update 2]). Do <b>not</b> use Visual Studio Express 2012 <em>for Windows 8</em>. You must install [http://msdn.microsoft.com/en-us/library/ms717422.aspx Windows SDK], otherwise CMake will not even find the C compiler during configure. In CMake, choose <tt>Visual Studio 11 Win64</tt> as generator.<br />
* Cygwin (untested)<br />
** Cygwin suite (building with cygwin gcc not supported, but the cygwin shell environment can be used to run git, svn, etc).</div>Agiraulthttps://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_Instructions/Prerequisites&diff=49201Documentation/Nightly/Developers/Build Instructions/Prerequisites2016-12-14T17:29:23Z<p>Agirault: improve style and info for qt4</p>
<hr />
<div><noinclude>{{documentation/versioncheck}}</noinclude><br />
__TOC__<br />
<br />
== PREREQUISITES ==<br />
<br><br />
<!--<br />
Please check that the following tools are installed on your machine.<br />
<br />
We try to keep current with the most recent releases of these prerequisites, but sometimes it's critical to use the exact versions specified here. If you run into issues please do whatever you can to find a combination that works or contact the developer mailing list for suggestions.<br />
<br />
<br><br />
{{mbox<br />
| type = protection<br />
| text = Qt libraries are '''required'''. Consider reading [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt|Qt requirements]].<br />
| image= [[{{tool|logo|qt}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = CMake is '''required'''.<br />
| image= [[{{tool|logo|cmake}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Git is '''required'''.<br />
| image= [[{{tool|logo|git}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = SVN is '''required'''.<br />
| image= [[{{tool|logo|svn}}|x40px]]<br />
}}<br />
<br />
<br><br />
--><br />
The prerequisites listed below are required to be able to configure/build/package/test Slicer.<br />
<br />
=== Linux ===<br />
* [{{tool|download|cmake}} CMake] >= 3.7-rc02<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
* Qt 4.8.6. <small>See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Linux|here]]. See some history [http://na-mic.org/Mantis/view.php?id=3325#bugnotes here] (Note that any version >= Qt 4.7.4 can be used only for Ubuntu < 12.04)</small><br />
<br />
==== Debian ====<br />
<br />
* Debian squeeze/wheezy/testing(jessie) users, start by pasting the following lines in a terminal<br />
sudo apt-get install subversion git-core git-svn<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libosmesa6-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
sudo apt-get install cmake<br />
sudo apt-get install qt-sdk<br />
<br />
<hr><br />
<br />
<br />
==== Ubuntu ====<br />
<br />
===== Common Prerequisites =====<br />
<br />
<br />
sudo apt-get install subversion git-core git-svn<br />
<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
<br />
sudo apt-get install libosmesa6-dev # Only for Ubuntu < 14.04.3<br />
<br />
{{remark|red|On Ubuntu 14.04.3 LTS, attempting to install <tt>libosmesa6-dev</tt> results in an error.<pre><br />
The following packages have unmet dependencies:<br />
libosmesa6-dev : Depends: libosmesa6 (= 10.1.3-0ubuntu0.4) but it is not going to be installed<br />
E: Unable to correct problems, you have held broken packages.<br />
</pre><br />
For more details, see [https://bugs.launchpad.net/ubuntu/+source/mesa-lts-utopic/+bug/1424059 Bug 1424059].}}<br />
<br />
{{remark|green|Slicer compiles successfully without that package, but <tt>VTK_OPENGL_HAS_OSMESA</tt> is disabled.}}<br />
<br />
===== CMake =====<br />
<br />
<ol><br />
<li>Open a terminal and copy the command reported below</li><br />
<li>Download stable version of CMake and extract the archive:<br />
<pre><br />
mkdir ~/Support && cd ~/Support<br />
curl -O https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz<br />
tar -xzvf cmake-3.5.2-Linux-x86_64.tar.gz<br />
</pre><br />
</li><br />
<li>Create symbolic links into <code>~/bin</code><br />
<pre><br />
mkdir -p ~/bin<br />
for name in cmake ctest cpack ccmake cmake-gui; do<br />
ln -s ~/Support/cmake-3.5.2-Linux-x86_64/bin/$name ~/bin/$name<br />
done<br />
</pre><br />
</li><br />
</ol><br />
<br />
{{remark|red|You <b>MUST</b> download the standard CMake binary because the distributed version of CMake cannot be used to build slicer.<br><br />
See [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_distributed_CMake_can_not_be_used_on_Ubuntu_12.04_and_above_.3F|here]] for more details.}}<br />
<br />
===== Qt =====<br />
<br />
'''Ubuntu 14.04 and above''': Qt 4 == 4.8.7 MUST be used.<br />
<br />
See https://github.com/jcfr/qt-easy-build/blob/4.8.7/Build-qt.txt<br />
<br />
<br />
<br />
'''Ubuntu 12.04, 12.10, 13.04 and 13.10''': Qt 4 >= 4.8.5 MUST be used.<br />
<br />
<pre><br />
cd ~/Support # This is where we will build Qt and dependent libraries<br />
<br />
# Keep track of our working directory<br />
cwd=$(pwd)<br />
<br />
# This will download, then build zlib and openssl in the current folder<br />
rm -f get-and-build-openssl-for-slicer.sh<br />
wget https://gist.githubusercontent.com/jcfr/9513568/raw/21f4e4cabca5ad03435ecc17ab546dab5e2c1a2f/get-and-build-openssl-for-slicer.sh<br />
chmod u+x get-and-build-openssl-for-slicer.sh <br />
./get-and-build-openssl-for-slicer.sh <br />
<br />
# This will download Qt source in the current folder<br />
wget http://packages.kitware.com/download/item/6175/qt-everywhere-opensource-src-4.8.6.tar.gz<br />
md5=`md5sum ./qt-everywhere-opensource-src-4.8.6.tar.gz | awk '{ print $1 }'` &&<br />
[ $md5 == "2edbe4d6c2eff33ef91732602f3518eb" ] || echo "MD5 mismatch. Problem downloading Qt"<br />
<br />
# This will configure and build Qt in RELEASE against the zlib and openssl previously built<br />
tar -xzvf qt-everywhere-opensource-src-4.8.6.tar.gz<br />
mv qt-everywhere-opensource-src-4.8.6 qt-everywhere-opensource-release-src-4.8.6<br />
mkdir qt-everywhere-opensource-release-build-4.8.6<br />
cd qt-everywhere-opensource-release-src-4.8.6<br />
./configure -prefix $cwd/qt-everywhere-opensource-release-build-4.8.6 \<br />
-release \<br />
-opensource -confirm-license \<br />
-no-qt3support \<br />
-webkit \<br />
-nomake examples -nomake demos \<br />
-openssl -I $cwd/openssl-1.0.1e/include -L $cwd/openssl-1.0.1e \<br />
&& make -j7 && make install<br />
</pre><br />
<br />
For more details, consider reading the FAQ entry: [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_Qt_4_.3E.3D_4.8.5_should_be_used_on_Ubuntu_12.04_and_above_.3F|Why Qt 4 >= 4.8.5 should be used on Ubuntu 12.04 and above ?]]<br />
<br />
<hr><br />
<br />
<br />
==== CentOS ====<br />
*CentOS user type:<br />
yum install make gcc-c++ libX11-devel libXt-devel libXrender-devel libXext-devel libGLU-devel mesa-libOSMesa-devel mesa-libGL-devel mesa-libGLU-devel ncurses<br />
<br />
<!--<br />
Todo: This will have to be added in FAQ: Troubleshoot section<br />
''glx-utils'' provides ''glxgears'' that can be used to test rendering<br />
--><br />
<br />
=== MacOSX ===<br />
<br />
* El Capitan is what most developers use.<br />
* CMake 3.7-rc02 is recommended.<br />
<br />
====MacOSX 10.9.4 (Mavericks)====<br />
<br />
''' (1) Make sure to install this update: http://support.apple.com/kb/DL1754'''<br />
<br />
''' (2) Use CMake 3.0.1 - it is known to be working and is supported''' (if you want to use CMake already installed on your system, 2.8.12.2 is known to work on Mac OS X 10.9.5)<br />
<br />
* Mac Os X >= 10.5 (Leopard)<br />
* [{{tool|download|cmake}} CMake] >= 2.8.9<br />
** For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) and/or recent XCode >= 4.5.X - [{{tool|download|cmake}} CMake] >= 2.8.11 is required. See http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
<!-- Waiting for the official release, get the release candidate rc1 [http://www.cmake.org/files/v2.8/cmake-2.8.11-rc1-Darwin64-universal.tar.gz here]. For explanation, see [[Documentation/{{documentation/version}}/Developers/Build_Instructions#ld:_framework_not_found_QtWebKit|here]] and [[Documentation/{{documentation/version}}/Developers/Build_Instructions#On_MacOSX_10.8.2C_CMake_hangs_forever|here]]. These versions are also known to work: exact version 20130121-g92bd8 [http://www.cmake.org/files/dev/cmake-2.8.10.20130121-g92bd8-Darwin-universal.tar.gz here] (or version >= 2.8.10.20130220 [http://www.cmake.org/files/dev/?C=M;O=D here]).<br />
--><br />
<br />
$ curl -O http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
$ tar -xzvf cmake-2.8.11-Darwin64-universal.tar.gz --strip-components=1<br />
<br />
$ CMake\ 2.8-11.app/Contents/bin/cmake --version<br />
cmake version 2.8.11<br />
<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.9<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.6.5<br />
--><br />
* XCode (for the SDK libs)<br />
** After installing XCode, install XCode command line developer tools: <br />
<pre><br />
xcode-select --install<br />
</pre><br />
* XQuartz - For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
* Qt 4 >= 4.8.5. We recommend you install the following two packages:<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1.dmg qt-opensource-mac-4.8.6-1.dmg]<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1-debug-libs.dmg qt-opensource-mac-4.8.6-1-debug-libs.dmg]<br />
** For more details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Mac|here]]<br />
<!--<br />
** Newer Xcode versions (e.g. 4.3.2) use clang as the default compiler and '''clang is not compatible with ITK version 3'''. You should use ITK version 4 with recent versions of Xcode.<br />
** Xcode with gcc should ork with either version of ITK.<br />
** OS X Mountain Lion: In Xcode 4.5 you now need to install command line tools (no longer included by default). Install within Xcode under the Xcode->Preferences->Downloads tab (otherwise git svn will give errors). Then you will need to install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
--><br />
<br />
====Mac OSX 10.11 (El Capitan)====<br />
<br />
XCode up to version 7 is known to work for Slicer compilation. XCode 8 breaks things on several levels for now. <br />
Remember to install XCode command line tools (see above) if a reinstall for XCode is needed. <br />
<br />
The standard Qt4 installers fail on this version and the 4.8.6 source code won't build. But [http://slicer-devel.65872.n3.nabble.com/incompatible-qt-4-8-6-with-OS-X-El-Capitan-td4035551.html as described on the slicer-devel mailing list] it is possible to install the [https://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch homebrew version of qt4 which patches it to work on El Capitan] (see below).<br />
<br />
* Install the '''OS''', '''Xcode''', and '''XQuartz''' (see MacOSX 10.10 above)<br />
* Install '''Qt4''' by running the following two commands:<br />
<pre><br />
brew install qt4<br />
xcode-select --install<br />
</pre><br />
* TCL does not build correctly on El Capitan as of 2015-12-03, so when building Slicer turn `Slicer_USE_PYTHONQT_WITH_TCL` off.<br />
<br />
==== Mac OSX 10.12 (Sierra) ====<br />
<br />
Follow instructions for 10.11 and then run :<br />
<pre><br />
mkdir Slicer-superbuild<br />
cd Slicer-superbuild<br />
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF ../Slicer<br />
make -j `sysctl -n hw.ncpu`<br />
</pre><br />
<br />
Note: if Xcode is installed and the compiler works but you get errors about stdlib.h be sure you have run the '''xcode-select --install''' step described above.<br />
<br />
<br />
Confirmed with Xcode: Version 8.1 (8B62) and cmake version 3.4.20151021-g8fbc8e<br />
<br />
=== Windows ===<br />
<br />
==== Common Prerequisites ====<br />
* [{{tool|download|cmake}} CMake] >= 3.0 (3.7.1 recommended)<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.10<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.7.10<br />
* [https://code.google.com/p/msysgit/downloads/list?can=3 ''Git-X.X.X-preview2013XXXX.exe''] recommended.<br />
--><br />
<!--<br />
** Use of [http://code.google.com/p/tortoisegit/ TortoiseGit] is optional.<br />
--><br />
** {{note}}For convenience, you could update the PATH variable so that ''git'' can be automatically discovered when configuring Slicer. If not, you will have to specify the GIT_EXECUTABLE at configure time.<br />
<br />
* [http://www.sliksvn.com/en/download SlikSvn] <!-- or [http://www.cygwin.com cygwin's svn client]-->. If using TortoiseSVN (versions that support command line tools), make sure you install Command line tools (disabled by default)<br />
<br />
* NSIS (optional): Needed if packaging Slicer - Click [http://nsis.sourceforge.net/Download here] to download.<br />
<br />
* Qt: See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Windows|here]].<br />
<br />
==== Tested and recommended build environment ====<br />
<br />
* [https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx Visual Studio 2013] with Update 5, as of [https://github.com/Slicer/Slicer/commit/71602609ce2ae5e473ece392500825ca96213371 commit 7160260]: Slicer compilation is successful, with some caveats.<br />
** CMake >= 3.3.1<br />
** Build Qt 4.8.7 with SSL support using [https://github.com/jcfr/qt-easy-build/tree/4.8.7 qt-easy-build].<br />
** For Debug mode, disable <code>Slicer_USE_SimpleITK</code> in CMake.<br />
<br />
==== Experimental/deprecated build environments ====<br />
<br />
* VS2008 (deprecated)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2008-editions Microsoft Visual Studio 9 2008] (Any edition). [http://go.microsoft.com/?linkid=7729279 VS Express 2008 with SP1 direct link] (functional as of Jan 11, 2014)<br />
** Make sure to install SP1: Click [http://www.microsoft.com/download/en/details.aspx?id=10986 here] to download SP1 and click [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2012/008206.html here] to understand the motivation.<br />
*** Make sure to patch VS2008 using the script [https://gist.github.com/jcfr/3c7bef3f8b32f9f6ad4b fix-vc9-redist-manifests.ps1]<br />
* VS2010 (experimental, may not work)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2010-editions Microsoft Visual Studio 2010] (Any edition)<br />
** Make sure to build or install:<br />
*** Qt 4.8 <br />
** Make sure to install:<br />
*** SP1. Click [http://www.microsoft.com/download/en/details.aspx?id=23691 here] to download SP1 and click [http://developer.qt.nokia.com/faq/answer/why_do_all_qt_4.7_applications_crash_when_using_windows_7_x64_w_vs_2010 here] to understand the motivation.<br />
*** SP1 Compiler update. Click [https://www.microsoft.com/download/en/details.aspx?id=4422 here] to download and [http://slicer-devel.65872.n3.nabble.com/Windows-7-64Bits-Slicer-4-Build-with-VC-2010-problem-tt3730524.html#a3731661 here] to understand the motivation.<br />
<!-- JC: This links shouldn't be here: 1) Since this the developer section, it's assumed Visual Studio is installed. 2) The Dll are distributed within Slicer package --><br />
<!-- *** Optional: "Microsoft Visual C++ 2010 SP1 Redistributable Package". Click [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x64] download, or [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x86] download. [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 x86 (32bit) for VS 2008] --><br />
* VS2012 (experimental)<br />
** Use a desktop version such as [http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop Visual Studio 2012 Express <b>for Windows Desktop</b>] and remember [http://www.microsoft.com/en-us/download/details.aspx?id=38188 Visual Studio 2012 Update 2]). Do <b>not</b> use Visual Studio Express 2012 <em>for Windows 8</em>. You must install [http://msdn.microsoft.com/en-us/library/ms717422.aspx Windows SDK], otherwise CMake will not even find the C compiler during configure. In CMake, choose <tt>Visual Studio 11 Win64</tt> as generator.<br />
* Cygwin (untested)<br />
** Cygwin suite (building with cygwin gcc not supported, but the cygwin shell environment can be used to run git, svn, etc).</div>Agiraulthttps://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Build_Instructions/Prerequisites&diff=49198Documentation/Nightly/Developers/Build Instructions/Prerequisites2016-12-14T16:57:37Z<p>Agirault: switch xquartz and qt</p>
<hr />
<div><noinclude>{{documentation/versioncheck}}</noinclude><br />
__TOC__<br />
<br />
== PREREQUISITES ==<br />
<br><br />
<!--<br />
Please check that the following tools are installed on your machine.<br />
<br />
We try to keep current with the most recent releases of these prerequisites, but sometimes it's critical to use the exact versions specified here. If you run into issues please do whatever you can to find a combination that works or contact the developer mailing list for suggestions.<br />
<br />
<br><br />
{{mbox<br />
| type = protection<br />
| text = Qt libraries are '''required'''. Consider reading [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt|Qt requirements]].<br />
| image= [[{{tool|logo|qt}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = CMake is '''required'''.<br />
| image= [[{{tool|logo|cmake}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Git is '''required'''.<br />
| image= [[{{tool|logo|git}}|x40px]]<br />
}}<br />
<br><br />
<br />
{{mbox<br />
| type = protection<br />
| text = SVN is '''required'''.<br />
| image= [[{{tool|logo|svn}}|x40px]]<br />
}}<br />
<br />
<br><br />
--><br />
The prerequisites listed below are required to be able to configure/build/package/test Slicer.<br />
<br />
=== Linux ===<br />
* [{{tool|download|cmake}} CMake] >= 3.7-rc02<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
* Qt 4.8.6. <small>See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Linux|here]]. See some history [http://na-mic.org/Mantis/view.php?id=3325#bugnotes here] (Note that any version >= Qt 4.7.4 can be used only for Ubuntu < 12.04)</small><br />
<br />
==== Debian ====<br />
<br />
* Debian squeeze/wheezy/testing(jessie) users, start by pasting the following lines in a terminal<br />
sudo apt-get install subversion git-core git-svn<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libosmesa6-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
sudo apt-get install cmake<br />
sudo apt-get install qt-sdk<br />
<br />
<hr><br />
<br />
<br />
==== Ubuntu ====<br />
<br />
===== Common Prerequisites =====<br />
<br />
<br />
sudo apt-get install subversion git-core git-svn<br />
<br />
sudo apt-get install make gcc g++ libx11-dev libxt-dev libgl1-mesa-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev<br />
<br />
sudo apt-get install libosmesa6-dev # Only for Ubuntu < 14.04.3<br />
<br />
{{remark|red|On Ubuntu 14.04.3 LTS, attempting to install <tt>libosmesa6-dev</tt> results in an error.<pre><br />
The following packages have unmet dependencies:<br />
libosmesa6-dev : Depends: libosmesa6 (= 10.1.3-0ubuntu0.4) but it is not going to be installed<br />
E: Unable to correct problems, you have held broken packages.<br />
</pre><br />
For more details, see [https://bugs.launchpad.net/ubuntu/+source/mesa-lts-utopic/+bug/1424059 Bug 1424059].}}<br />
<br />
{{remark|green|Slicer compiles successfully without that package, but <tt>VTK_OPENGL_HAS_OSMESA</tt> is disabled.}}<br />
<br />
===== CMake =====<br />
<br />
<ol><br />
<li>Open a terminal and copy the command reported below</li><br />
<li>Download stable version of CMake and extract the archive:<br />
<pre><br />
mkdir ~/Support && cd ~/Support<br />
curl -O https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz<br />
tar -xzvf cmake-3.5.2-Linux-x86_64.tar.gz<br />
</pre><br />
</li><br />
<li>Create symbolic links into <code>~/bin</code><br />
<pre><br />
mkdir -p ~/bin<br />
for name in cmake ctest cpack ccmake cmake-gui; do<br />
ln -s ~/Support/cmake-3.5.2-Linux-x86_64/bin/$name ~/bin/$name<br />
done<br />
</pre><br />
</li><br />
</ol><br />
<br />
{{remark|red|You <b>MUST</b> download the standard CMake binary because the distributed version of CMake cannot be used to build slicer.<br><br />
See [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_distributed_CMake_can_not_be_used_on_Ubuntu_12.04_and_above_.3F|here]] for more details.}}<br />
<br />
===== Qt =====<br />
<br />
'''Ubuntu 14.04 and above''': Qt 4 == 4.8.7 MUST be used.<br />
<br />
See https://github.com/jcfr/qt-easy-build/blob/4.8.7/Build-qt.txt<br />
<br />
<br />
<br />
'''Ubuntu 12.04, 12.10, 13.04 and 13.10''': Qt 4 >= 4.8.5 MUST be used.<br />
<br />
<pre><br />
cd ~/Support # This is where we will build Qt and dependent libraries<br />
<br />
# Keep track of our working directory<br />
cwd=$(pwd)<br />
<br />
# This will download, then build zlib and openssl in the current folder<br />
rm -f get-and-build-openssl-for-slicer.sh<br />
wget https://gist.githubusercontent.com/jcfr/9513568/raw/21f4e4cabca5ad03435ecc17ab546dab5e2c1a2f/get-and-build-openssl-for-slicer.sh<br />
chmod u+x get-and-build-openssl-for-slicer.sh <br />
./get-and-build-openssl-for-slicer.sh <br />
<br />
# This will download Qt source in the current folder<br />
wget http://packages.kitware.com/download/item/6175/qt-everywhere-opensource-src-4.8.6.tar.gz<br />
md5=`md5sum ./qt-everywhere-opensource-src-4.8.6.tar.gz | awk '{ print $1 }'` &&<br />
[ $md5 == "2edbe4d6c2eff33ef91732602f3518eb" ] || echo "MD5 mismatch. Problem downloading Qt"<br />
<br />
# This will configure and build Qt in RELEASE against the zlib and openssl previously built<br />
tar -xzvf qt-everywhere-opensource-src-4.8.6.tar.gz<br />
mv qt-everywhere-opensource-src-4.8.6 qt-everywhere-opensource-release-src-4.8.6<br />
mkdir qt-everywhere-opensource-release-build-4.8.6<br />
cd qt-everywhere-opensource-release-src-4.8.6<br />
./configure -prefix $cwd/qt-everywhere-opensource-release-build-4.8.6 \<br />
-release \<br />
-opensource -confirm-license \<br />
-no-qt3support \<br />
-webkit \<br />
-nomake examples -nomake demos \<br />
-openssl -I $cwd/openssl-1.0.1e/include -L $cwd/openssl-1.0.1e \<br />
&& make -j7 && make install<br />
</pre><br />
<br />
For more details, consider reading the FAQ entry: [[Documentation/{{documentation/version}}/Developers/FAQ/Building#Why_Qt_4_.3E.3D_4.8.5_should_be_used_on_Ubuntu_12.04_and_above_.3F|Why Qt 4 >= 4.8.5 should be used on Ubuntu 12.04 and above ?]]<br />
<br />
<hr><br />
<br />
<br />
==== CentOS ====<br />
*CentOS user type:<br />
yum install make gcc-c++ libX11-devel libXt-devel libXrender-devel libXext-devel libGLU-devel mesa-libOSMesa-devel mesa-libGL-devel mesa-libGLU-devel ncurses<br />
<br />
<!--<br />
Todo: This will have to be added in FAQ: Troubleshoot section<br />
''glx-utils'' provides ''glxgears'' that can be used to test rendering<br />
--><br />
<br />
=== MacOSX ===<br />
<br />
* El Capitan is what most developers use.<br />
* CMake 3.7-rc02 is recommended.<br />
<br />
====MacOSX 10.9.4 (Mavericks)====<br />
<br />
''' (1) Make sure to install this update: http://support.apple.com/kb/DL1754'''<br />
<br />
''' (2) Use CMake 3.0.1 - it is known to be working and is supported''' (if you want to use CMake already installed on your system, 2.8.12.2 is known to work on Mac OS X 10.9.5)<br />
<br />
* Mac Os X >= 10.5 (Leopard)<br />
* [{{tool|download|cmake}} CMake] >= 2.8.9<br />
** For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) and/or recent XCode >= 4.5.X - [{{tool|download|cmake}} CMake] >= 2.8.11 is required. See http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
<!-- Waiting for the official release, get the release candidate rc1 [http://www.cmake.org/files/v2.8/cmake-2.8.11-rc1-Darwin64-universal.tar.gz here]. For explanation, see [[Documentation/{{documentation/version}}/Developers/Build_Instructions#ld:_framework_not_found_QtWebKit|here]] and [[Documentation/{{documentation/version}}/Developers/Build_Instructions#On_MacOSX_10.8.2C_CMake_hangs_forever|here]]. These versions are also known to work: exact version 20130121-g92bd8 [http://www.cmake.org/files/dev/cmake-2.8.10.20130121-g92bd8-Darwin-universal.tar.gz here] (or version >= 2.8.10.20130220 [http://www.cmake.org/files/dev/?C=M;O=D here]).<br />
--><br />
<br />
$ curl -O http://www.cmake.org/files/v2.8/cmake-2.8.11-Darwin64-universal.tar.gz<br />
$ tar -xzvf cmake-2.8.11-Darwin64-universal.tar.gz --strip-components=1<br />
<br />
$ CMake\ 2.8-11.app/Contents/bin/cmake --version<br />
cmake version 2.8.11<br />
<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
* [{{tool|download|svn}} Svn] >= 1.7<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.9<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.6.5<br />
--><br />
* XCode (for the SDK libs)<br />
** After installing XCode, install XCode command line developer tools: <br />
<pre><br />
xcode-select --install<br />
</pre><br />
* XQuartz - For Mac Os X >= 10.8 ([http://en.wikipedia.org/wiki/OS_X_Mountain_Lion Mountain Lion]) install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
* Qt 4 >= 4.8.5. We recommend you install the following two packages:<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1.dmg qt-opensource-mac-4.8.6-1.dmg]<br />
** Download and install [http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-mac-4.8.6-1-debug-libs.dmg qt-opensource-mac-4.8.6-1-debug-libs.dmg]<br />
** For more details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Mac|here]]<br />
<!--<br />
** Newer Xcode versions (e.g. 4.3.2) use clang as the default compiler and '''clang is not compatible with ITK version 3'''. You should use ITK version 4 with recent versions of Xcode.<br />
** Xcode with gcc should ork with either version of ITK.<br />
** OS X Mountain Lion: In Xcode 4.5 you now need to install command line tools (no longer included by default). Install within Xcode under the Xcode->Preferences->Downloads tab (otherwise git svn will give errors). Then you will need to install XQuartz (http://xquartz.macosforge.org) to get X11 (no longer a default in OS X).<br />
--><br />
<br />
====Mac OSX 10.11 (El Capitan)====<br />
<br />
XCode up to version 7 is known to work for Slicer compilation. XCode 8 breaks things on several levels for now. <br />
Remember to install XCode command line tools (see above) if a reinstall for XCode is needed. <br />
<br />
The standard Qt4 installers fail on this version and the 4.8.6 source code won't build. But [http://slicer-devel.65872.n3.nabble.com/incompatible-qt-4-8-6-with-OS-X-El-Capitan-td4035551.html as described on the slicer-devel mailing list] it is possible to install the homebrew version of qt4.<br />
<br />
After installing the OS and Xcode, run the following two commands:<br />
<pre><br />
brew install qt4<br />
xcode-select --install<br />
</pre><br />
<br />
TCL does not build correctly on El Capitan as of 2015-12-03, so when building Slicer turn Slicer_USE_PYTHONQT_WITH_TCL off.<br />
<br />
==== Mac OSX 10.12 (Sierra) ====<br />
<br />
Follow instructions for 10.11 and then run :<br />
<pre><br />
mkdir Slicer-superbuild<br />
cd Slicer-superbuild<br />
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF ../Slicer<br />
make -j `sysctl -n hw.ncpu`<br />
</pre><br />
<br />
Note: if Xcode is installed and the compiler works but you get errors about stdlib.h be sure you have run the '''xcode-select --install''' step described above.<br />
<br />
<br />
Confirmed with Xcode: Version 8.1 (8B62) and cmake version 3.4.20151021-g8fbc8e<br />
<br />
=== Windows ===<br />
<br />
==== Common Prerequisites ====<br />
* [{{tool|download|cmake}} CMake] >= 3.0 (3.7.1 recommended)<br />
* [{{tool|download|git}} Git] >= 1.7.10<br />
<!--<br />
*[[{{tool|logo|cmake}}|x16px]] [{{tool|download|cmake}} CMake] >= 2.8.10<br />
*[[{{tool|logo|git}}|x16px]] [{{tool|download|git}} Git] >= 1.7.10<br />
* [https://code.google.com/p/msysgit/downloads/list?can=3 ''Git-X.X.X-preview2013XXXX.exe''] recommended.<br />
--><br />
<!--<br />
** Use of [http://code.google.com/p/tortoisegit/ TortoiseGit] is optional.<br />
--><br />
** {{note}}For convenience, you could update the PATH variable so that ''git'' can be automatically discovered when configuring Slicer. If not, you will have to specify the GIT_EXECUTABLE at configure time.<br />
<br />
* [http://www.sliksvn.com/en/download SlikSvn] <!-- or [http://www.cygwin.com cygwin's svn client]-->. If using TortoiseSVN (versions that support command line tools), make sure you install Command line tools (disabled by default)<br />
<br />
* NSIS (optional): Needed if packaging Slicer - Click [http://nsis.sourceforge.net/Download here] to download.<br />
<br />
* Qt: See details [[Documentation/{{documentation/version}}/Developers/Build_Instructions/Prerequisites/Qt#Windows|here]].<br />
<br />
==== Tested and recommended build environment ====<br />
<br />
* [https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx Visual Studio 2013] with Update 5, as of [https://github.com/Slicer/Slicer/commit/71602609ce2ae5e473ece392500825ca96213371 commit 7160260]: Slicer compilation is successful, with some caveats.<br />
** CMake >= 3.3.1<br />
** Build Qt 4.8.7 with SSL support using [https://github.com/jcfr/qt-easy-build/tree/4.8.7 qt-easy-build].<br />
** For Debug mode, disable <code>Slicer_USE_SimpleITK</code> in CMake.<br />
<br />
==== Experimental/deprecated build environments ====<br />
<br />
* VS2008 (deprecated)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2008-editions Microsoft Visual Studio 9 2008] (Any edition). [http://go.microsoft.com/?linkid=7729279 VS Express 2008 with SP1 direct link] (functional as of Jan 11, 2014)<br />
** Make sure to install SP1: Click [http://www.microsoft.com/download/en/details.aspx?id=10986 here] to download SP1 and click [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2012/008206.html here] to understand the motivation.<br />
*** Make sure to patch VS2008 using the script [https://gist.github.com/jcfr/3c7bef3f8b32f9f6ad4b fix-vc9-redist-manifests.ps1]<br />
* VS2010 (experimental, may not work)<br />
** [https://www.microsoft.com/visualstudio/en-us/products/2010-editions Microsoft Visual Studio 2010] (Any edition)<br />
** Make sure to build or install:<br />
*** Qt 4.8 <br />
** Make sure to install:<br />
*** SP1. Click [http://www.microsoft.com/download/en/details.aspx?id=23691 here] to download SP1 and click [http://developer.qt.nokia.com/faq/answer/why_do_all_qt_4.7_applications_crash_when_using_windows_7_x64_w_vs_2010 here] to understand the motivation.<br />
*** SP1 Compiler update. Click [https://www.microsoft.com/download/en/details.aspx?id=4422 here] to download and [http://slicer-devel.65872.n3.nabble.com/Windows-7-64Bits-Slicer-4-Build-with-VC-2010-problem-tt3730524.html#a3731661 here] to understand the motivation.<br />
<!-- JC: This links shouldn't be here: 1) Since this the developer section, it's assumed Visual Studio is installed. 2) The Dll are distributed within Slicer package --><br />
<!-- *** Optional: "Microsoft Visual C++ 2010 SP1 Redistributable Package". Click [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x64] download, or [http://www.microsoft.com/download/en/details.aspx?id=13523 here for x86] download. [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 x86 (32bit) for VS 2008] --><br />
* VS2012 (experimental)<br />
** Use a desktop version such as [http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop Visual Studio 2012 Express <b>for Windows Desktop</b>] and remember [http://www.microsoft.com/en-us/download/details.aspx?id=38188 Visual Studio 2012 Update 2]). Do <b>not</b> use Visual Studio Express 2012 <em>for Windows 8</em>. You must install [http://msdn.microsoft.com/en-us/library/ms717422.aspx Windows SDK], otherwise CMake will not even find the C compiler during configure. In CMake, choose <tt>Visual Studio 11 Win64</tt> as generator.<br />
* Cygwin (untested)<br />
** Cygwin suite (building with cygwin gcc not supported, but the cygwin shell environment can be used to run git, svn, etc).</div>Agirault