Hi, Got it, thanks for the clarification.
Best, Mujassim On Fri, 28 Mar 2025 at 12:23, Dinkelacker, Stefan < s.dinkelac...@dkfz-heidelberg.de> wrote: > Hi, > > AFAIK the B-Spline interpolation was never implemented for the contour > model, which is why changing the interpolation mode doesn't show any > effect. The only auto-smooth contour-like class in MITK that I am aware of > is PlanarSubdivisionPolygon for closed figures and PlanarBezierCurve for > open figures. Both are PlanarFigures, though. > > Best, > Stefan > ________________________________________ > Von: Mujassim Jamal <mujassimjama...@gmail.com> > Gesendet: Mittwoch, 26. März 2025 12:20 > An: Dinkelacker, Stefan > Cc: mitk-users@lists.sourceforge.net > Betreff: Re: [Extern] - [mitk-users] Contour Editing in MITK > > Hi Stefan, > > While exploring the ContourModel class, I noticed that it provides > B_SPLINE line interpolation. I wanted to try it out by setting the line > interpolation (as shown in the code below) on a loaded contour from a .cnt > file. > > However, for some reason, it still behaves as linear interpolation when I > add a few points and drag them. Interestingly, when I print the > interpolation setting after applying it, it shows B_SPLINE, but visually, > it still appears to behave as LINEAR. > > ''' > auto* contour = > dynamic_cast<mitk::ContourModel*>(this->m_ContourNode->GetData()); > contour->SetLineSegmentInterpolation(mitk::ContourModel::B_SPLINE); > contour->Modified(); > ''' > > The rest of the setup involves state machine files and the > ContourModelInteractor, but I’m unsure where I might be making a mistake. > Do you have any suggestions on what I might be missing? > > Best, > Mujassim > > > On Fri, 21 Feb 2025 at 12:26, Dinkelacker, Stefan < > s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>> > wrote: > Hi Mujassim, > > this is just a VTK polygon line or something similar that is generated by > the SurfaceVtkMapper2D for visualization purposes. It is the contour > created from the cutting plane through the polygon model (called Surface in > MITK). While it is only used for visualization and therefore is not really > accessible from the rest of MITK, you can of course also use VTK in your > plugin to create a contour from a polygon model. Just look at the > SurfaceVtkMapper2D class. It probably used a vtkCutter. You could then use > the output from that filter to manually create an MITK contour out of it. > But be aware that the contour VTK is creating is not the closest vertices > of your polygon model to the cutting plane, it will create separate points > exactly located on the cutting plane. You would need to take extra measures > to map these to vertices of your polygon model vertices if you want to > modify the polygon model as well. > > Best, > Stefan > > [1] https://docs.mitk.org/2024.12/classmitk_1_1SurfaceVtkMapper2D.html > > ________________________________________ > Von: Mujassim Jamal <mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com>> > Gesendet: Donnerstag, 20. Februar 2025 05:49 > An: Dinkelacker, Stefan > Cc: mitk-users@lists.sourceforge.net<mailto: > mitk-users@lists.sourceforge.net> > Betreff: Re: [Extern] - [mitk-users] Contour Editing in MITK > > Hi Stefan, > > While exploring the workbench, I noticed that when creating a polygon > model, non-interactive 2D contour is also displayed in the 2D views for the > corresponding generated 3D model: > > [image.png] > > I wanted to ask if it would be a good idea to replace this non-interactive > contour with an interactive one by assigning a custom interactor to it? > > Best regards, > Mujassim > > On Tue, 11 Feb 2025 at 15:33, Dinkelacker, Stefan < > s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de > ><mailto:s.dinkelac...@dkfz-heidelberg.de<mailto: > s.dinkelac...@dkfz-heidelberg.de>>> wrote: > Hi Mujassim, > > I think at this stage an example-based exploration is probably the most > efficient way of going forward. For the Live Wire tool, see [1] for example > and move up the inheritance until you find the code using an Interactor. An > Interactor is connected to a state machine and a separate config for that > statemachine. Both are written as .xml files. The Interactor code connects > actions and conditions of a statemachine to its methods. > > Best, > Stefan > > [1] https://docs.mitk.org/2024.12/classmitk_1_1LiveWireTool2D.html > ________________________________________ > Von: Mujassim Jamal <mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com><mailto:mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com>>> > Gesendet: Dienstag, 11. Februar 2025 04:46 > An: Dinkelacker, Stefan > Cc: mitk-users@lists.sourceforge.net<mailto: > mitk-users@lists.sourceforge.net><mailto:mitk-users@lists.sourceforge.net > <mailto:mitk-users@lists.sourceforge.net>> > Betreff: Re: [Extern] - [mitk-users] Contour Editing in MITK > > Hi, > > Yes, I previously built MITK v2023.12, but I encountered several compiler > errors related to ITK (conversion type errors) and POCO (OpenSSL version > mismatch). > > Thank you for suggesting these four tools. I have explored all of them and > found that the Draw Polygon and LiveWire tools closely match my use case, > though I will still need to make significant customizations. I plan to > refer to the code of these two tools to get an initial understanding of > point adding, dragging, picking, etc. > > I would appreciate it if you could share any resources on developing a > custom interactor in MITK. > > Best, > Mujassim > > On Wed, 5 Feb 2025 at 17:28, Dinkelacker, Stefan < > s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de > ><mailto:s.dinkelac...@dkfz-heidelberg.de<mailto: > s.dinkelac...@dkfz-heidelberg.de>><mailto:s.dinkelac...@dkfz-heidelberg.de > <mailto:s.dinkelac...@dkfz-heidelberg.de><mailto: > s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>>>> > wrote: > Hi and welcome to MITK! > > The last version of MITK that supported Qt 5 was MITK v2023.12, as far as > I know. Starting with later versions, Qt 6.6+ is a strict requirement. > > To get started, I recommend running the MitkWorkbench application and > exploring the contour interaction functionalities available in two > different plugins: > > - Measurement [1]: The Draw Polygon and Draw Subdivision Polygon tools > demonstrate how contours can be interacted with. > > - Segmentation [2]: The Lasso and LiveWire tools are both based on contour > interaction. > > MITK provides at least two approaches for working with contours and > interacting with them. However, you will need to write some code—for > example, handling a Modified event to map contour changes back to a 3D > model (referred to as a Surface in MITK). Additionally, MITK's current > interactors only operate on individual contour vertices. > > If you aim to implement an approach similar to what you showed in your > video—where multiple neighboring vertices of a contour are modified > simultaneously—you will need to develop a custom interactor. While this is > certainly possible, it is not the simplest task for a first MITK project. > > Best, > Stefan > > [1] https://docs.mitk.org/2024.12/org_mitk_views_measurement.html > [2] > https://docs.mitk.org/2024.12/org_mitk_views_segmentation.html#org_mitk_views_segmentationlivewiretool > > ________________________________________ > Von: Mujassim Jamal <mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com><mailto:mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com>><mailto:mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com><mailto:mujassimjama...@gmail.com<mailto: > mujassimjama...@gmail.com>>>> > Gesendet: Mittwoch, 5. Februar 2025 11:27 > An: mitk-users@lists.sourceforge.net<mailto: > mitk-users@lists.sourceforge.net><mailto:mitk-users@lists.sourceforge.net > <mailto:mitk-users@lists.sourceforge.net>><mailto: > mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net > ><mailto:mitk-users@lists.sourceforge.net<mailto: > mitk-users@lists.sourceforge.net>>> > Betreff: [Extern] - [mitk-users] Contour Editing in MITK > > Hi, > > First of all, I am new to using MITK. I am working with Qt 5.15.2, but I > couldn't find an MITK version compatible with this Qt version. Therefore, I > built the latest version of MITK (v2024.12). > > My question is: Can I use the MITK toolkit to create a contour editing > feature such that, after projecting a 3D model as a contour onto the 2D > segmentation, I can pick and drag the points on the contour in 2D and see > the effect directly on the 3D model? I found that MITK provides various > contour-related classes, but I am unsure whether they can be used for my > specific use case. > > I am attaching a Google Drive link that contains a video showcasing what I > want to achieve using MITK. > Video: > https://drive.google.com/file/d/1Wu3UJmQQeewlR0Thvx7TPP0iYLEmfu1J/view?usp=sharing > > Thank you. >
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users