Hi!
I’m making my first steps with developing slicer extention and I’ve stuck in one place…
I’ve got MR of sacroiliac. I’m trying to process segmentation of bones using watershed from markers.
I’ve got something like that:
import SimpleITK as sitk
import numpy as nppara = {‘sigma’:2}
itkimg = sitk.GetImageFromArray(imageArray)
itkimg = sitk.DiscreteGaussian(itkimg, para[‘sigma’])
itkimg = sitk.GradientMagnitude(itkimg)lineimg = sitk.MorphologicalWatershedFromMarkers(itkimg, itkmarker, markWatershedLine=True)
where imageArray is numpy array which contains image.
but I need “itkmarker” image - it should be binary image which contains markers… And I have no idea how to get it. Or maybe there is simplier way to run that algorithm? I’ll be grateful for any tips.