Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click'n'Join-Mode extension to ITK-SNAP incuding global, dynamic watershed segmentation #1

Open
wants to merge 58 commits into
base: master
Choose a base branch
from

Conversation

romangrothausmann
Copy link

These extensions to ITK-SNAP implement a global watershed segmentation mode (gWS). The extensions incorporate a Click'n'Join mode (CnJ) as the intended usage of gWS is related to the SegmentationEditor (http://www.itk.org/ITK/applications/segmentationeditor.html, demo video: SegmentationEditor.avi of http://www.insight-journal.org/browse/publication/70).
In CnJ mode, the user can add or remove labels from a source label image to a destination label image. The source image can either be the currently loaded segmentation, one from a file or the output of gWS. The over or under segmentation can be dynamically controlled during CnJ+gWS avoiding a complete recomputation of the watershed segementation.
There is also an extension to the "adaptive" brush of ITK-SNAP to make use of this dynamic WS (dWS) relevelling which can then be adjusted with the mouse wheel.

CnJ on the output of a morphological watershed (with borders):
ss_cnj_01

CnJ+gWS:
ss_gws_04

romangrothausmann and others added 19 commits October 9, 2014 16:20
needed manual modifications, these still need testing of GWS_ROI_MODE

Conflicts:
	Common/SNAPCommon.h
	GUI/Qt/Windows/MainControlPanel.cxx
	GUI/Qt/Windows/MainControlPanel.ui
	GUI/Qt/Windows/MainImageWindow.cxx
	GUI/Qt/Windows/MainImageWindow.h
	GUI/Qt/Windows/MainImageWindow.ui
	Logic/Framework/IRISApplication.cxx
…only in SNAKE_ROI_MODE but also in GLOBALWS_ROI_MODE
Conflicts:
	GUI/Qt/Components/CursorInspector.ui
@romangrothausmann
Copy link
Author

I managed to get 64bit "Join Source Image" (Jsrc) working, now even with itkScalarToRGBPixelFunctor. 64bit is essential for proper function of gWS, as otherwise casting to 16bit causes multiple regions to be added to Jdst even though only a single label is clicked on in Jsrc. However, with 64bit the LUT usually used for the label/segmentation image is too short an not suitable for Jsrc any more. Therefore itkScalarToRGBPixelFunctor (can be regarded as an infinite LUT) is now used to colour Jsrc. This works very well for gWS but its colours for small label IDs are quite similar. This is a disadvantage when using plain CnJ. Ideally, the user should be given an option which type of colouring should be used, or should be made dependent on the mode.

gWS in stage 3 showing the overlayed "Join Source Image" colored with itkScalarToRGBPixelFunctor:
ss_gws_06

This is a little unconventional, but I decided that the changes in the master branch are really
ready for primetime in release 3.4, especially since I tested them for the RSNA course.
@romangrothausmann romangrothausmann deleted the master+gdWS branch January 30, 2018 09:46
@romangrothausmann romangrothausmann restored the master+gdWS branch January 30, 2018 09:49
@romangrothausmann
Copy link
Author

Got closed due to branch renaming.

Official Release 3.4.0

Conflicts:
	GUI/Model/GlobalUIModel.cxx
	GUI/Model/PaintbrushModel.cxx
	GUI/Model/PaintbrushModel.h
	GUI/Model/UIState.h
	GUI/Qt/Components/SliceViewPanel.ui
	GUI/Qt/Windows/MainControlPanel.cxx
	GUI/Qt/Windows/MainControlPanel.h
	GUI/Qt/Windows/MainControlPanel.ui
	GUI/Qt/Windows/MainImageWindow.cxx
	GUI/Qt/Windows/MainImageWindow.h
	GUI/Qt/Windows/MainImageWindow.ui
	Logic/Slicing/IRISSlicer.txx
…fault any more, filter executes but has no effect
@romangrothausmann
Copy link
Author

Parallelized itkJoinCopyFilter now working in CnJ mode, which about halves the time needed for processing each CnJ-click. The other half is apparently spent on a single-threaded process (which could possibly be avoided, needs further investigation).
The modifications include the integration of v3.4 changes, e.g. RLEImage and ITK-4.5.2 improvements.

@romangrothausmann
Copy link
Author

The single-threaded process that took up time was StoreUndoPoint, which is not working for CnJ in v3.4 any way.
On a workstation with 24 Intel Xeon CPUs (from 2012) processing a CnJ-click now takes less than 2 seconds for a dataset of 1400x1750x1750 voxel (16GB for 32-bit integer of a watershed pre-segmentation) that used to take around 30 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants