<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.10%2FDevelopers%2FFAQ%2FGeneral</id>
	<title>Documentation/4.10/Developers/FAQ/General - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.10%2FDevelopers%2FFAQ%2FGeneral"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.10/Developers/FAQ/General&amp;action=history"/>
	<updated>2026-04-13T23:03:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.10/Developers/FAQ/General&amp;diff=59729&amp;oldid=prev</id>
		<title>UpdateBot: Nightly -&gt; 4.10</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.10/Developers/FAQ/General&amp;diff=59729&amp;oldid=prev"/>
		<updated>2018-10-19T00:41:34Z</updated>

		<summary type="html">&lt;p&gt;Nightly -&amp;gt; 4.10&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;__TOC__&lt;br /&gt;
={{#titleparts: {{PAGENAME}} | | -1 }}=&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&lt;br /&gt;
='''Developer FAQ: {{{1}}}'''=&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is Slicer ? ==&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/Slicer}}&lt;br /&gt;
&lt;br /&gt;
== How can I get help debugging my code? ==&lt;br /&gt;
&lt;br /&gt;
You can post questions to the [[Help|developer mailing list]].  &lt;br /&gt;
&lt;br /&gt;
Please consider:&lt;br /&gt;
* Review the mailing list archives for similar questions&lt;br /&gt;
* If you ask a coding question, try to use a [http://sscce.org/ Short Self-Contained Correct Example]&lt;br /&gt;
* It's a friendly community but people are busy so if you get a terse response don't take it personally :-)&lt;br /&gt;
&lt;br /&gt;
== How to setup for Git development ? ==&lt;br /&gt;
See [[Documentation/{{documentation/version}}/Developers/DevelopmentWithGit#Slicer Setup | Slicer Setup ]]&lt;br /&gt;
&lt;br /&gt;
== How to contribute a patch ? ==&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/Tutorials/ContributePatch}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is our bug / feature request workflow ? ==&lt;br /&gt;
&lt;br /&gt;
{{:Documentation/{{documentation/version}}/Developers/IssueWorkflow}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to schedule a Developer Hangout ? ==&lt;br /&gt;
See instruction [[Developer_Meetings/OrganizerInstruction|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Should core feature be implemented in C++ or Python ? ==&lt;br /&gt;
&lt;br /&gt;
There is no one-size-fits-all answer to this.  There are many examples of &amp;quot;core' features of Slicer implemented using a variety of programming languages and techniques.&lt;br /&gt;
&lt;br /&gt;
* MRML and most Logic operations are in C++, implemented as VTK subclasses&lt;br /&gt;
* the Application and most GUI functionality is in C++, implemented as QWidget subclasses&lt;br /&gt;
* most bundled modules are implemented as &amp;quot;loadable&amp;quot; modules, combining VTK and Qt parent classes&lt;br /&gt;
* many important modules bundled with Slicer are implemented as python scripted modules (LabelStatistics, ExtensionWizard...) or with hybrid C++ and Python solutions (Editor, DICOM, DataProbe...)&lt;br /&gt;
* other &amp;quot;core&amp;quot; features rely on JavaScript and web technologies (Charts, SceneViews, Extension Manager....)&lt;br /&gt;
&lt;br /&gt;
The implementation choice depends heavily on the use case and the best judgement of the people who commit to maintain the code.  If you are contributing an extension that you will maintain, you have a lot of flexibility.  If you are hoping to pass off your code to others and you expect them to maintain it, then you should carefully follow the example of similar code that is already being maintained so that your code will be a pleasure to work with and not a misfit that causes trouble.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Original comment from Andras Lasso copied from [https://github.com/Slicer/Slicer/pull/373#issuecomment-146894971 PR#373] discussion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many reasons for implementing Slicer core in C++, we just list here few reasons:&lt;br /&gt;
&lt;br /&gt;
* C++ rigor and extensive compile-time checks increases the chance of catching errors earlier. C++ enforces many things that in Python are managed by good programming practices (that are not enforced and in general not followed by Slicer developers).&lt;br /&gt;
&lt;br /&gt;
* C++ memory management is much more explicit, which is more difficult to learn than Python, but allows much better efficiency (you can prevent memory fragmentation, optimize memory reallocations, etc), which is useful for code that may run hundreds of times per second (this code does).&lt;br /&gt;
&lt;br /&gt;
* There are lots of good examples of solid, fast C++ displayable managers. Python displayable managers are more at the experimental level.&lt;br /&gt;
&lt;br /&gt;
* Accessibility of Python classes from C++ modules is cumbersome. Accessibility of C++ classes is very convenient from both Python and C++ modules.&lt;br /&gt;
&lt;br /&gt;
* Some projects don't use Python and don't want to use it (Python brings in huge amount of additional code, which is a problem if you want to minimize the amount of code that goes through regulatory approval)&lt;br /&gt;
&lt;br /&gt;
* Profiling and optimization of mixed C++/Python code is very difficult (both C++ and Python profilers treat the &amp;quot;other side&amp;quot; as black hole). Since all the rest of the Slicer core is implemented in C++ (with a few small exceptions), it is much easier to implement this in C++, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That said, we love Python programming, do it extensively, but implementing Slicer core features in Python has just too many disadvantages.&lt;br /&gt;
&lt;br /&gt;
== How to convert between ITK images and Slicer scalar volume nodes? ==&lt;br /&gt;
&lt;br /&gt;
See discussion and relevant links at http://slicer-devel.65872.n3.nabble.com/Converting-ITK-image-to-Slicer-ScalarVolumeNode-td4035458.html&lt;br /&gt;
&lt;br /&gt;
Steve Pieper's suggested architecture for using ITK code to process Slicer MRML data is as follows:&lt;br /&gt;
&lt;br /&gt;
1) develop an ITK pipeline that implements the desired behavior&lt;br /&gt;
&lt;br /&gt;
2) wrap the pipeline in a high level pure C++ ITK class that exposes the key inputs, output, parameters, and events&lt;br /&gt;
&lt;br /&gt;
3) write a thin CLI wrapper around (2) using the Slicer Execution mode&lt;br /&gt;
&lt;br /&gt;
4a) use the CLI in Slicer as-is&lt;br /&gt;
&lt;br /&gt;
4b) write a scripted module that presents a higher level interface and calls the CLI&lt;br /&gt;
&lt;br /&gt;
4c) if you need more interactivity, write a vtkITK wrapper around (2) that exposes the high level ITK class aspects using VTK conventions; expose this via a scripted or loadable module.&lt;br /&gt;
&lt;br /&gt;
A nice thing about this approach is that (1) through (3) are all highly reusable in different contexts both in and out of Slicer.&lt;br /&gt;
&lt;br /&gt;
Also this path, steps (1) through (4b) all the data types and orientation mappings between itk::Image and vtkMRMLScalarVolumeNode are handled automatically with existing mechanisms.  Since the CLI is built as a shared library by default there is no file system overhead, just a few memcpys which is not much different than using the ITK pipeline directly.&lt;br /&gt;
&lt;br /&gt;
Another option is to implement the pipeline in SimpleITK, but adding custom C++ code into the SimpleITK is more complex and I don't think it's even possible to do this as an extension, whereas the path described above is completely compatible with our extension process.&lt;br /&gt;
&lt;br /&gt;
Note that the use case for the code that Raul points to is the opposite case, using a VTK class inside of an ITK pipeline.  In this case ITKVtkGlue is very appropriate.  The IJKToRAS transforms are not relevant since vtkImageData class does not support orientation and all the operations need to be performed in pixel space.&lt;br /&gt;
&lt;br /&gt;
If CLI route is not suitable for some reason, helper classes are available in SlicerRT that do conversion between itkImage and vtkMRMLScalarVolumeNode initializing IJKtoRAS matrix, see https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/SlicerRtCommon.h&lt;br /&gt;
&lt;br /&gt;
== What is the difference between Slicer Plot and Chart ? ==&lt;br /&gt;
&lt;br /&gt;
Slicer currently has two ways of displaying plots: Plot and Chart:&lt;br /&gt;
* [[Documentation/{{documentation/version}}/Developers/Plots | Plots]]: C++ environment based on VTK plots.&lt;br /&gt;
** Advantages:&lt;br /&gt;
*** Plots display data stored in [[Documentation/{{documentation/version}}/Modules/Tables | Tables]]. Data is synchronized, therefore any data change in a table updates corresponding plots immediately.&lt;br /&gt;
*** Interactive capabilities, such as data selection, point editing by click-and-drag.&lt;br /&gt;
*** Faster plotting for many points (number of points &amp;gt; 10^5 is not a problem, it is useful for data exploration).&lt;br /&gt;
* [[Documentation/{{documentation/version}}/Developers/Charts | Charts]]: uses a JavaScript library, jqPlot, for the rendering.&lt;br /&gt;
** Advantages: slightly better quality rendering.&lt;br /&gt;
&lt;br /&gt;
Chart infrastructure will be probably deprecated and removed from future versions of Slicer.&lt;/div&gt;</summary>
		<author><name>UpdateBot</name></author>
		
	</entry>
</feed>