[Insight-users] Managed ITK itkConfidenceConnectedImageFilter
Dan Mueller
dan.muel at gmail.com
Tue Feb 23 05:30:42 EST 2010
Hi Ali,
It seems strange that you only get the following explicit types:
>> itkConfidenceConnectedImageFilter_IF2IF2
>> itkConfidenceConnectedImageFilter_IF3IF3
>> itkConfidenceConnectedImageFilter_ISS2ISS2
>> itkConfidenceConnectedImageFilter_IUC2IUC2
When I build the latest ManagedITK (or look at the pre-built binaries
on the Google Code page) I see the following types:
itkConfidenceConnectedImageFilter_IF2IF2
itkConfidenceConnectedImageFilter_IF3IF3
itkConfidenceConnectedImageFilter_ISS2ISS2
itkConfidenceConnectedImageFilter_ISS3ISS3
itkConfidenceConnectedImageFilter_IUC2IUC2
itkConfidenceConnectedImageFilter_IUC3IUC3
Regarding your question about how to create a new instance of the filter:
There are two ways:
1. Decide the type at compile time. eg.
itkConfidenceConnectedImageFilter filter =
itkConfidenceConnectedImageFilter_IF2IF2.New();
2. Decide the type at run-time. eg.
itkImageBase input = itk.itkImage_UC2.New();
itkImageBase output = itk.itkImage_UC2.New();
// Select the IUC2IUC2 explicit type
itkConfidenceConnectedImageFilter filter =
itkConfidenceConnectedImageFilter.New(input, output);
Hope this helps.
Regards, Dan
On 23 February 2010 10:24, Lodron, Gerald <Gerald.Lodron at joanneum.at> wrote:
> Short is the same as signed short so you need:
>
> itkConfidenceConnectedImageFilter_ISS3ISS3
>
> if the class does not exist you must build it first for that image type
> (this classes are automatically build from the original templated C++
> classes) but as i said i don't use managed code because of such problems
> and can't support you with that.
>
> A workaround would be to convert your image from short to float then you can
> use itkConfidenceConnectedImageFilter_IF3IF3, note that there already exists
> some caster classes in itk which will do that for you
> ________________________________
> Von: Ali Habib [mailto:ali.mahmoud.habib at gmail.com]
> Gesendet: Dienstag, 23. Februar 2010 10:17
> An: Lodron, Gerald
> Betreff: Re: [Insight-users] Managed ITK itkConfidenceConnectedImageFilter
>
>
> thanks for your reply
>
> What if my Input is DICOM series of type short , which type shall I do ,
> specially I want to segment in 3D
>
> Best regards
>
> On Tue, Feb 23, 2010 at 11:12 AM, Lodron, Gerald <Gerald.Lodron at joanneum.at>
> wrote:
>>
>> itkConfidenceConnectedImageFilter_IF2IF2 - input = 2D image of type
>> float, output = 2D image of type float
>> itkConfidenceConnectedImageFilter_IF3IF3 - input = 3D image of type
>> float, output =3D image of type float
>> itkConfidenceConnectedImageFilter_ISS2ISS2 - input = 2D image of type
>> signed short, output = 2D image of type signed short
>>
>> and so on....
>>
>> I don't use managed code because of this strange behaviour so i can't give
>> you more support on error codes
>> ________________________________
>> Von: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org]
>> Im Auftrag von Ali Habib
>> Gesendet: Dienstag, 23. Februar 2010 09:39
>> An: insight-users at itk.org
>> Betreff: [Insight-users] Managed ITK itkConfidenceConnectedImageFilter
>>
>> I am trying to apply itkConfidenceConnectedImageFilter to image DICOM
>> series , so I will use the watersheed example as guide
>>
>>
>> when use itkConfidenceConnectedImageFilter . it give error that this class
>> can't be accessed due to its protection
>>
>> and discovered that there're 4 classes for
>> itkConfidenceConnectedImageFilter
>>
>> itkConfidenceConnectedImageFilter_IF2IF2
>> itkConfidenceConnectedImageFilter_IF3IF3
>> itkConfidenceConnectedImageFilter_ISS2ISS2
>> itkConfidenceConnectedImageFilter_IUC2IUC2
>>
>> I want to do
>> itkConfidenceConnectedImageFilter
>> x = new itkConfidenceConnectedImageFilter (input); // input is the
>> itkimage that read the dicom series
>> and continue as in watersheed example
>> what's the difference between those classses
>> any suggestion please
>> Best regards
More information about the Insight-users
mailing list