[ITK-users] Processing 3D data question.
Robert
scorpiuni at gmail.com
Mon May 30 15:59:46 EDT 2016
Do you really need this?
indexRadius[0] = 1; // radius along x
indexRadius[1] = 1; // radius along y
indexRadius[2] = 0; // radius along z
Usually, in ITK, you define filters like this:
First your Imagetype, which is composed from PixelType and Dimension. Your
Dimension is 3, Pixeltype is probably float. This is what I meant by this:
typedef itk::Image< unsigned char, 3 > ImageType3D; (you got this commented
in your code, was that your intention? you use ImageType3D late, so I guess
you already got that defined somewhere else)
Your filter initialization should work. However, about the radius:
Like I said, you work on a 3D image, so you initialize your filter to work
with 3D images (your defined type, just like you did it). You usually won't
need to kind of iterate slice by slice like if you'd write a "normal" c++
filter. I think this mindset causes your error (judging from using an array
as radius).
radius can be an integer value. ITK now uses this value in all needed
dimensions. There is no need for an array as far as I know. Try using
medianFilter->SetRadius(indexRadius); with indexRadius being a single
number.
Like I said, I never worked with data extracted from dicom slices, but I
think it should work if you change the radius.
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588938.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list