From espakm at gmail.com Tue Nov 1 16:58:03 2011 From: espakm at gmail.com (Miklos Espak) Date: Tue, 1 Nov 2011 17:58:03 +0100 Subject: [Ctk-developers] workflow framework and threads In-Reply-To: References: Message-ID: Hi, could you (or anybody), eventually, have a look at the test that I shared? As a workaround I disabled the Next button until the computation finishes (between the onExit and the onExitComplete signal), but it treats only one symptom. Now I ran into the problem again, and I do not know what to do with this. Step2 relies on some data that Step1 creates in the onExitComplete function. However, because of the bug, the data is not ready. The events happen in this order: Step1 onExit Step2 onEntry Step2 createUserInterface Step1 onExitComplete In my opinion, the step1 onExitComplete should be invoked before step2 onEntry. Even, it would not be bad if the user interface was ready before the onEntry signal, but it is not so important. Thanks, Miklos On Tue, Oct 25, 2011 at 3:11 PM, Miklos Espak wrote: > Hi, > > I added a new test. You can run it by > > $ ./CTKWidgetsCppTests ctkExampleUseOfWorkflowWidgetUsingThreads -I > > in the project bin directory. > > The onExit function of the steps start a thread that waits for 5 sec > ("calculation"). The onExitComplete signal is sent when the thread finishes. > > If you press the Next button, the "calculation" starts and after 5 sec you > get to the next page. That is fine. However, if you press Next within this > period, the thread of the second step will start, although the first step > has not finished. (It has not sent the onExitComplete signal.) > > You can checkout the test via GitHub: > > https://github.com/commontk/CTK/issues/61 > > Thanks for dealing with this issue! > > Best, > Miklos > > On Mon, Oct 24, 2011 at 11:47 PM, Miklos Espak wrote: > >> By running the step in a different thread, what do you mean exactly ? >>> >> >> Sorry, I was not clear. I run some calculations (ITK filters) in the >> workflow steps, and I start them in a new thread. The workflow step listens >> to the "finished" and "terminated" signal of the thread and it signals >> "onExitCompleted" after the thread is finished. >> >> >>> As a side note: "Although QObjectis reentrant, the GUI classes, notably >>> QWidget and all its >>> subclasses, are not reentrant. They can only be used from the main thread." >>> See http://doc.qt.nokia.com/stable/threads-qobject.html >>> >> >> Yes, I had some troubles because of this, but I solved them. I refactored >> every GUI access from the function that runs the calculation. E.g. the >> thread that runs the calculation notifies the GUI thread through signals >> about the progress of the internal ITK filters. In this way the thread does >> not need to access the progress bar. >> >> Would it be possible for you to share some code ? May a topic on your CTK >>>> fork ? >>>> >>> >> Yes, I will upload a sample app tomorrow. >> >> Thanks, >> Miklos >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dicom at offis.de Wed Nov 2 15:33:47 2011 From: dicom at offis.de (OFFIS DICOM Team) Date: Wed, 02 Nov 2011 16:33:47 +0100 Subject: [Ctk-developers] how to enable logging In-Reply-To: References: Message-ID: <4EB162DB.9010802@offis.de> Hi Miklos, just returned from vacation, so this answer is pretty late: Am 21.10.2011 19:06, schrieb Miklos Espak: > Hi, > > how to enable logging in CTK? I enabled the Log4Qt option in CTK and > rebuilt it, but it is apparently not enough. Do I have to create a config > file? The syntax is like for Log4J? If it is relevant for you to also configure the DICOM-related logging the logging detail, i.e. format, destination and so on, you might be interested in little howtos in our wiki: http://support.dcmtk.org/wiki/dcmtk/howto/start#logging All the best, Michael -- OFFIS DICOM Team, Escherweg 2, 26121 Oldenburg, Germany E-Mail: dicom at offis.de, URL: http://dicom.offis.de From espakm at gmail.com Wed Nov 2 15:47:56 2011 From: espakm at gmail.com (Miklos Espak) Date: Wed, 2 Nov 2011 16:47:56 +0100 Subject: [Ctk-developers] how to enable logging In-Reply-To: <4EB162DB.9010802@offis.de> References: <4EB162DB.9010802@offis.de> Message-ID: Hi Michael, Jean-Christophe gave the solution, it works now. Thanks for the link, I did not know that page, it contains many useful howtos. Thanks, Miklos -------------- next part -------------- An HTML attachment was scrubbed... URL: From pieper at ibility.net Wed Nov 9 20:58:46 2011 From: pieper at ibility.net (Steve Pieper) Date: Wed, 9 Nov 2011 15:58:46 -0500 Subject: [Ctk-developers] Fwd: [Na-mic-project-week] Invitation to 2011 Winter Project Week in Salt Lake City In-Reply-To: <4EA8AF7E.3070604@bwh.harvard.edu> References: <4EA8AF7E.3070604@bwh.harvard.edu> Message-ID: Hi CTKers - For people interested in more hacking opportunities we wanted to send around an announcement/reminder of the upcoming na-mic meeting in Salt Lake City, Utah in early January. This will be the 14th time we've held this event, and it never fails to be a stimulating and rewarding time to meet with like-minded developers and work on thorny projects that can best be solved with some face to face time. To get an idea of the atmosphere and the types of projects, have a look at this page about the most recent summer's event: http://www.na-mic.org/Wiki/index.php/2011_Summer_Project_Week For logistics and other info about the upcoming event look here: http://www.na-mic.org/Wiki/index.php/AHM_2012 Thanks, Steve ---------- Forwarded message ---------- From: Tina Kapur Date: Wed, Oct 26, 2011 at 9:10 PM Subject: [Na-mic-project-week] Invitation to 2011 Winter Project Week in Salt Lake City To: na-mic-project-week at na-mic.org, namic-all at na-mic.org, igtws at bwh.harvard.edu Dear Colleague, We would like to invite you to the 14th Project Week in Salt Lake City, Utah, from January 9-13, 2012. Similar to previous events, we will spend this week pursuing hands-on research and development activity in Neuroscience and Image-Guided Therapy applications. If you are interested in learning more about this the 14th Project Week of hands-on research and software development, please join us for our kick-off teleconference tomorrow i.e. Thursday, October 27th at 3pm ET. Dial 800-728-9607 (or 913-904-9873) Participant code: 6815251# Best Regards, -Tina -- Tina Kapur, Ph.D. Executive Director Image Guided Therapy Program Department of Radiology Brigham and Women's Hospital 75 Francis Street, Boston MA 02115 ______________________________**_________________ Na-mic-project-week mailing list Na-mic-project-week at na-mic.org http://public.kitware.com/cgi-**bin/mailman/listinfo/na-mic-**project-week -------------- next part -------------- An HTML attachment was scrubbed... URL: From jchris.fillionr at kitware.com Mon Nov 14 10:36:14 2011 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Mon, 14 Nov 2011 05:36:14 -0500 Subject: [Ctk-developers] CTK - What about requiring CMake 2.8.4 ? Message-ID: Folks, Does it sound reasonable if CTK requires at least CMake 2.8.4 ? The motivation behind that change is explained here: https://github.com/commontk/CTK/issues/13 An alternative solution would be to provide a custom ExternalProject.cmake within CTK repository. However, it would be great if we could avoid to maintain our own version of ExternalProject.cmake. Thanks for your input Jc -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jchris.fillionr at kitware.com Mon Nov 14 13:24:17 2011 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Mon, 14 Nov 2011 08:24:17 -0500 Subject: [Ctk-developers] CTK Hackfest - Google hangout Message-ID: A common place to share your screen, chat, etc ... See https://plus.google.com/hangouts/extras/talk.google.com/CTK# I already joined .. Jc -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jchris.fillionr at kitware.com Mon Nov 14 14:14:47 2011 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Mon, 14 Nov 2011 09:14:47 -0500 Subject: [Ctk-developers] CTK - What about requiring CMake 2.8.4 ? In-Reply-To: References: Message-ID: Folks, So far, the following project have no objection requiring CMake 2.8.4 for CTK: - MedInria / DTK - Slicer - MITK - Maf3 - GMIAS (Does not depend on CTK) If there are no objections, I will change the required CMake version and work on fixing the following issue: https://github.com/commontk/CTK/issues/13 Thanks Jc On Mon, Nov 14, 2011 at 5:36 AM, Jean-Christophe Fillion-Robin < jchris.fillionr at kitware.com> wrote: > Folks, > > Does it sound reasonable if CTK requires at least CMake 2.8.4 ? > > The motivation behind that change is explained here: > https://github.com/commontk/CTK/issues/13 > > An alternative solution would be to provide a custom ExternalProject.cmake > within CTK repository. However, it would be great if we could avoid to > maintain our own version of ExternalProject.cmake. > > Thanks for your input > Jc > > -- > +1 919 869 8849 > > -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pieper at ibility.net Thu Nov 17 16:28:16 2011 From: pieper at ibility.net (Steve Pieper) Date: Thu, 17 Nov 2011 11:28:16 -0500 Subject: [Ctk-developers] roadmap discussion Message-ID: Hello from the Sofia-Antipolis Hackfest - Between hacking sessions we found time to discuss and write up the roadmap for CTK to lay out some of the key concepts, technologies, and goals of the effort. We hope this will help new users and contributors get a quick idea of the CTK. Further ideas and suggestions from the people who couldn't make it to France is also welcome. The roadmap is now linked from the commontk.org home page. http://www.commontk.org/index.php/CTK-Roadmap -Steve p.s. we're also writing a lot of code! -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.zelzer at dkfz-heidelberg.de Fri Nov 18 15:42:55 2011 From: s.zelzer at dkfz-heidelberg.de (Sascha Zelzer) Date: Fri, 18 Nov 2011 16:42:55 +0100 Subject: [Ctk-developers] CMake configuration simplified Message-ID: <4EC67CFF.2020809@dkfz-heidelberg.de> Hi Folks, I would like to draw your attention to a new feature of the CTK build system which I personally find very pleasing. During the Sophia-Antipolis Hackfest we worked on making it easier for new CTK users to configure CTK with CMake. Previously, many build options were displayed after the initial configure run. This was overwhelming and confusing. The new system retains all previous CMake options but marks nearly all of them as advanced. You will now see a set of high-level options which are used to enable a default set of libraries and/or plugins related to one of the main "sub-projects" inside CTK. However, you still have full control over all build options in advanced mode. The relevant merge commit is https://github.com/commontk/CTK/commit/7cac6550c2cade1fb69ec2136c89b56ed332d99b Let us now if you have any troubles using it. Thanks, Sascha From espakm at gmail.com Wed Nov 23 07:35:07 2011 From: espakm at gmail.com (Miklos Espak) Date: Wed, 23 Nov 2011 08:35:07 +0100 Subject: [Ctk-developers] ctkWorkflowWidgetStep API Message-ID: Hi, I created a few widget steps. I noticed that the user interface is created lazily, at the first time it is needed, after the first onEntry call. For this reason I have to check in the onEntry function if the user interface has been created, so I can update the GUI. I have not found a nice way to do this. There is a "createUserInterfaceComplete" function that "signals" if the UI has been created. This is not a Qt signal, however, so you cannot connect it to a slot. It is not virtual either, so you cannot override it safely. The only reasonable way I found was to create a createUserInterfaceComplete2 function in the common superclass of my widget steps, that calls createUserInterfaceComplete *and* sets a flag. Would it be possible to make one of these changes? - introduce an isUserInterfaceComplete() function or such - make createUserInterfaceComplete virtual - make createUserInterfaceComplete a Qt signal, so one can be notified if the UI is created - create the GUI before the first onEntry call Thanks, Miklos From julien.finet at kitware.com Fri Nov 25 14:17:58 2011 From: julien.finet at kitware.com (Julien Finet) Date: Fri, 25 Nov 2011 15:17:58 +0100 Subject: [Ctk-developers] ctkWorkflowWidgetStep API In-Reply-To: References: Message-ID: Hi Miklos, Can you suggest a patch ? We can review and merge it. Regards, Julien. On Wed, Nov 23, 2011 at 8:35 AM, Miklos Espak wrote: > Hi, > > I created a few widget steps. I noticed that the user interface is > created lazily, at the first time it is needed, after the first > onEntry call. > > For this reason I have to check in the onEntry function if the user > interface has been created, so I can update the GUI. > > I have not found a nice way to do this. > > There is a "createUserInterfaceComplete" function that "signals" if > the UI has been created. This is not a Qt signal, however, so you > cannot connect it to a slot. > > It is not virtual either, so you cannot override it safely. > > The only reasonable way I found was to create a > createUserInterfaceComplete2 function in the common superclass of my > widget steps, that calls createUserInterfaceComplete *and* sets a > flag. > > Would it be possible to make one of these changes? > ?- introduce an isUserInterfaceComplete() function or such > ?- make createUserInterfaceComplete virtual > ?- make createUserInterfaceComplete a Qt signal, so one can be > notified if the UI is created > ?- create the GUI before the first onEntry call > > Thanks, > Miklos > _______________________________________________ > Ctk-developers mailing list > Ctk-developers at commontk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers > From espakm at gmail.com Fri Nov 25 14:45:08 2011 From: espakm at gmail.com (Miklos Espak) Date: Fri, 25 Nov 2011 15:45:08 +0100 Subject: [Ctk-developers] ctkWorkflowWidgetStep API In-Reply-To: References: Message-ID: Yes, I can create a patch. Which solution you prefer? I would go for the first. >> Would it be possible to make one of these changes? >> ?- introduce an isUserInterfaceComplete() function or such >> ?- make createUserInterfaceComplete virtual >> ?- make createUserInterfaceComplete a Qt signal, so one can be >> notified if the UI is created >> ?- create the GUI before the first onEntry call >> >> Thanks, >> Miklos >> _______________________________________________ >> Ctk-developers mailing list >> Ctk-developers at commontk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers >> > From julien.finet at kitware.com Fri Nov 25 14:58:40 2011 From: julien.finet at kitware.com (Julien Finet) Date: Fri, 25 Nov 2011 15:58:40 +0100 Subject: [Ctk-developers] ctkWorkflowWidgetStep API In-Reply-To: References: Message-ID: Hi Miklos, Looking at the code, it seems that the signal is fired: //----------------------------------------------------------------------------- void ctkWorkflowWidgetStepPrivate::createUserInterfaceCompleteInternal()const { emit createUserInterfaceComplete(); } It is done in the Pimpl though. If you search for "createUserInterfaceComplete" in CTK, you'll find some use case. To be honest, I've no idea how it works :-) Maybe Jc or Danielle can comment on it. I am surprised you need to listen for createUserInterfaceComplete, I would expect to do all the initialization work in ctkWorkflowWidgetStep::createUserInterface(). j. On Fri, Nov 25, 2011 at 3:45 PM, Miklos Espak wrote: > Yes, I can create a patch. > > Which solution you prefer? I would go for the first. > >>> Would it be possible to make one of these changes? >>> ?- introduce an isUserInterfaceComplete() function or such >>> ?- make createUserInterfaceComplete virtual >>> ?- make createUserInterfaceComplete a Qt signal, so one can be >>> notified if the UI is created >>> ?- create the GUI before the first onEntry call >>> >>> Thanks, >>> Miklos >>> _______________________________________________ >>> Ctk-developers mailing list >>> Ctk-developers at commontk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers >>> >> > From espakm at gmail.com Fri Nov 25 15:52:40 2011 From: espakm at gmail.com (Miklos Espak) Date: Fri, 25 Nov 2011 16:52:40 +0100 Subject: [Ctk-developers] ctkWorkflowWidgetStep API In-Reply-To: References: Message-ID: On Fri, Nov 25, 2011 at 3:58 PM, Julien Finet wrote: > Hi Miklos, > > Looking at the code, it seems that the signal is fired: > > //----------------------------------------------------------------------------- > void ctkWorkflowWidgetStepPrivate::createUserInterfaceCompleteInternal()const > { > ?emit createUserInterfaceComplete(); > } > > It is done in the Pimpl though. If you search for > "createUserInterfaceComplete" in CTK, you'll find some use case. > To be honest, I've no idea how it works :-) > Maybe Jc or Danielle can comment on it. > > I am surprised you need to listen for createUserInterfaceComplete, I > would expect to do all the initialization work in > ctkWorkflowWidgetStep::createUserInterface(). I have to fill the input widgets with values when I arrive at a workflow step. I would do it in the onEntry, but at the first onEntry call the user interface is not ready. So I have to check in the onEntry if the GUI is created or not. This cannot be queried by the ctkWorkflowStepWidget functions. But no problem, I rearrange my code so I can decide it by a null check. Best, Miklos From jchris.fillionr at kitware.com Wed Nov 30 22:05:30 2011 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Wed, 30 Nov 2011 17:05:30 -0500 Subject: [Ctk-developers] ctkWorkflowWidgetStep API In-Reply-To: References: Message-ID: Hi Miklos, Keep us posted on your progress. Thanks Jc On Fri, Nov 25, 2011 at 10:52 AM, Miklos Espak wrote: > On Fri, Nov 25, 2011 at 3:58 PM, Julien Finet > wrote: > > Hi Miklos, > > > > Looking at the code, it seems that the signal is fired: > > > > > //----------------------------------------------------------------------------- > > void > ctkWorkflowWidgetStepPrivate::createUserInterfaceCompleteInternal()const > > { > > emit createUserInterfaceComplete(); > > } > > > > It is done in the Pimpl though. If you search for > > "createUserInterfaceComplete" in CTK, you'll find some use case. > > To be honest, I've no idea how it works :-) > > Maybe Jc or Danielle can comment on it. > > > > I am surprised you need to listen for createUserInterfaceComplete, I > > would expect to do all the initialization work in > > ctkWorkflowWidgetStep::createUserInterface(). > > I have to fill the input widgets with values when I arrive at a > workflow step. I would do it in the onEntry, but at the first onEntry > call the user interface is not ready. > > So I have to check in the onEntry if the GUI is created or not. This > cannot be queried by the ctkWorkflowStepWidget functions. > > But no problem, I rearrange my code so I can decide it by a null check. > > Best, > Miklos > -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: From espakm at gmail.com Wed Nov 30 23:20:31 2011 From: espakm at gmail.com (Miklos Espak) Date: Thu, 1 Dec 2011 00:20:31 +0100 Subject: [Ctk-developers] ctkWorkflowWidgetStep API In-Reply-To: References: Message-ID: I found a trivial solution, by arranging my code. I keep a pointer to the widget (called "ui") that I initialize it with 0 in the constructor, and assign the real widget instance to it in the createUserInterface function, so I can decide by a simple null pointer check whether the user interface has been created. (Until now "ui" was an ordinary variable, not a pointer, and I called ui.setupUi(this) in the createUserInterface.) Sorry for this many mails about this. However, my other problem is still there. It was that sometimes the onEntry function is not called at all. I uploaded a test to reconstruct the situation. Have you checked it eventually? It is here: https://github.com/commontk/CTK/issues/61 Thanks, Miklos On Wed, Nov 30, 2011 at 11:05 PM, Jean-Christophe Fillion-Robin wrote: > Hi Miklos, > > Keep us posted on your progress. > > Thanks > Jc > > On Fri, Nov 25, 2011 at 10:52 AM, Miklos Espak wrote: >> >> On Fri, Nov 25, 2011 at 3:58 PM, Julien Finet >> wrote: >> > Hi Miklos, >> > >> > Looking at the code, it seems that the signal is fired: >> > >> > >> > //----------------------------------------------------------------------------- >> > void >> > ctkWorkflowWidgetStepPrivate::createUserInterfaceCompleteInternal()const >> > { >> > ?emit createUserInterfaceComplete(); >> > } >> > >> > It is done in the Pimpl though. If you search for >> > "createUserInterfaceComplete" in CTK, you'll find some use case. >> > To be honest, I've no idea how it works :-) >> > Maybe Jc or Danielle can comment on it. >> > >> > I am surprised you need to listen for createUserInterfaceComplete, I >> > would expect to do all the initialization work in >> > ctkWorkflowWidgetStep::createUserInterface(). >> >> I have to fill the input widgets with values when I arrive at a >> workflow step. I would do it in the onEntry, but at the first onEntry >> call the user interface is not ready. >> >> So I have to check in the onEntry if the GUI is created or not. This >> cannot be queried by the ctkWorkflowStepWidget functions. >> >> But no problem, I rearrange my code so I can decide it by a null check. >> >> Best, >> Miklos > > > > -- > +1 919 869 8849 > >