# Looking for old Slicer 3D source code with wxWidgets and VTK

**URL:** <https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752>\
**Category:** Development\
**Created:** [March 6, 2024, 8:26pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752 "2024-03-06T20:26:04Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 6, 2024, 8:26pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/1 "2024-03-06T20:26:04Z")

</div>

Hi,

The question is not about Slicer 3D but I remember I’ve read that Slicer used to be using wxWidgets before it was translated to Qt.

Now there is a task to understand how can I combine wxWidgets with VTK (even I don’t have experience with wxWidgets yet). Mostly the question is how to create a widget with VTK render window in it and then to be able to connect wxWidgets signals (or events) with VTK observers.

Maybe somebody could give some hints about that? Or maybe there is still old Slicer 3D releases where it is already implemented?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 6, 2024, 8:28pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/2 "2024-03-06T20:28:44Z")

</div>

This is probably better asked in the [VTK forum](https://discourse.vtk.org/). However, it looks like this link might of some interest to you:  
[https://forums.wxwidgets.org/viewtopic.php?p=212799&sid=facae6786160e8638a52c0a41423a10b#p212799](https://forums.wxwidgets.org/viewtopic.php?p=212799&sid=facae6786160e8638a52c0a41423a10b#p212799)

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 6, 2024, 8:33pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/3 "2024-03-06T20:33:28Z")

</div>

Thank you!

Actually I was thinking where to ask this question but decided to ask there as most of the time Slicer 3D community helped a lot 🙂

Thank you for the link! It is in Python and this will be the most easiest way to make first attempts.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [March 6, 2024, 8:37pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/4 "2024-03-06T20:37:03Z")

</div>

> [@keri](#):
>
> Slicer used to be using wxWidgets before it was translated to Qt.

To clarify, prior to Slicer 4.x, the cross-platform `KWWidgets`\[1\] toolkit was used and not `wxWidgets`

For reference:

> KWWidgets [was] a free, cross-platform and open-license GUI Toolkit. Over a hundred C++ classes have been developed and used by Kitware, Inc. to create open-source and commercial end-user applications like ParaView or VolView […]. Is [was] also used by the National Alliance for Medical Image Computing for the 3D Slicer project.

* * *

1. [KWWidgets - KitwarePublic](https://web.archive.org/web/20200123234643/http://www.kwwidgets.org/Wiki/KWWidgets)

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 6, 2024, 8:41pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/5 "2024-03-06T20:41:41Z")

</div>

Oh! I’m sorry.

Good to know, thank you!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 7, 2024, 5:59am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/6 "2024-03-07T05:59:09Z")

</div>

I’m just curious, why are you thinking about using wxWidgets? Qt license costs? What alternatives have you considered?

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 7, 2024, 9:43am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/7 "2024-03-07T09:43:19Z")

</div>

Hello Andras,

It is all about sanctions. Qt have officially quited our country. Some companies don’t want to risk.

Also I remember [your post about Qt licensing](https://discourse.vtk.org/t/build-an-desktop-application-using-vtk/8542/6?u=kerim). But as I remember since Qt6 it started to use GPL3 (not LGPL) everywhere. This is going to add more restrictions right?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 7, 2024, 2:42pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/8 "2024-03-07T14:42:05Z")

</div>

Regarding Qt6, from what I see the core is still available under LGPL:

[https://doc.qt.io/qt-6/licensing.html](https://doc.qt.io/qt-6/licensing.html)

There are some Qt add-ons that are GPL or commercial only, so people should keep that in mind if they want to use them. We shouldn’t use these in Slicer:

[https://doc.qt.io/qt-6/qtmodules.html#gpl-licensed-addons](https://doc.qt.io/qt-6/qtmodules.html#gpl-licensed-addons)

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 7, 2024, 4:33pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/9 "2024-03-07T16:33:08Z")

</div>

Thank you! Good to know.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 7, 2024, 7:03pm UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/10 "2024-03-07T19:03:31Z")

</div>

I agree, I don’t think a lot has changed in Qt regarding GPL/LGPL (some very niche Qt components has been GPL but we don’t need any of them). The main difference in Qt6 that you cannot get long-term support versions for free from the Qt Company. If you need stable Qt distributions for free then you need to go elsewhere. For example you can get it from [KDE](https://www.phoronix.com/news/KDE-Qt-5-Patch-Collection), but probably they only work on fixes for Linux.

In general, Qt Company is not behaving in a developer-friendly way, it does not invest much effort into classic widgets, and it does not focus on making it possible to run Qt applications with classic widgets in web browsers. So, it would be nice to find a possible alternatives.

wxWidget has no licensing issues, but it has very limited feature set, its development is quite slow, and I am not sure if it officially supports usage in the web browser. What other frameworks have you considered? Have you found any more actively developed, more modern, more web-friendly GUI framework?

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 8, 2024, 12:12am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/11 "2024-03-08T00:12:55Z")

</div>

I don’t think we have many choices because we need to use GUI framework along with VTK.

I know that wxWidgets have some (limited) support for VTK that is pros to use it.

Another option is to use client-server solutions and the use some other languages for frontend along with some remote VTK features. Here is the problem that not all the VTK functionality will be available (I guess) and it will be very sad to fall into such situation.

And for future references there was a [similar topic](https://discourse.vtk.org/t/what-are-the-best-gui-toolkits-that-can-be-used-to-make-a-vtk-based-app/9550/9)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 8, 2024, 12:16am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/12 "2024-03-08T00:16:10Z")

</div>

That topic is 1.5 years old, which is quite a long time these days. Now VTK can run natively in the web browser. No need for server-side rendering and remoting anymore.

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 8, 2024, 12:44am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/13 "2024-03-08T00:44:00Z")

</div>

Do you mean Trame and VTK.js?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 8, 2024, 12:50am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/14 "2024-03-08T00:50:05Z")

</div>

I mean C++ application using proper VTK (not vtk.js) compiled using webassembly and running in the web browser. See all the interactive examples in the VTK examples website: [https://examples.vtk.org/site/Cxx/IO/ReadAllPolyDataTypesDemo/](https://examples.vtk.org/site/Cxx/IO/ReadAllPolyDataTypesDemo/)

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 8, 2024, 12:58am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/15 "2024-03-08T00:58:13Z")

</div>

Thank you, cempletely forgot about that approach. I have to test that because it seems very attractive.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [March 8, 2024, 7:16am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/16 "2024-03-08T07:16:23Z")

</div>

> [@lassoan](#):
>
> I mean C++ application using proper VTK (not vtk.js) compiled using webassembly and running in the web browser.

Would the [Wt](https://www.webtoolkit.eu/wt) libraries have a place in this discussion? This is just a pointer since it aims at building web applications in C++.

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 8, 2024, 9:02am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/17 "2024-03-08T09:02:39Z")

</div>

Looks interesting, thank you.

The only thing is how to combine it with VTK (no information in internet yet).  
And another thing is GPL license: [they claim to open source code for any user](https://www.webtoolkit.eu/wt/download). Do they mean to open the whole project?

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [March 8, 2024, 9:11am UTC](https://discourse.slicer.org/t/looking-for-old-slicer-3d-source-code-with-wxwidgets-and-vtk/34752/18 "2024-03-08T09:11:49Z")

</div>

> [@keri](#):
>
> how to combine it with VTK

Don’t know, it was just a suggestion.

> [@keri](#):
>
> Do they mean to open the whole project?

Quoting the page you pointed to:

` **The Commercial License** has no such limitations: you may redistribute applications developed with Wt without needing to redistribute the source code.`

Buying a license is mandatory for closed source applications.
