[Insight-users] ManagedITK wrapping an external project

Carl Bateman Carl.Bateman at icr.ac.uk
Thu May 20 04:19:10 EDT 2010


Hi Dan,

many thanks for your response, it certainly provides a good starting point. I'll see how far I can get with it. :)

Regards,

Carl

>>> Dan Mueller <dan.muel at gmail.com> 20/05/2010 05:52 >>>
Hi Carl,

Sorry for the silence -- I am completely snowed under at the moment.

Regarding your question about page 31 of the article: the article text
is out of date, it refers to an old scheme which grouped the filters
into two groups: group and subgroup. Now a single group is used. The
listing is correct, the text is wrong. I have added a defect:
    http://code.google.com/p/manageditk/issues/detail?id=3 

I would recommend adding the wrapping for RegionOfInterestImageFilter
to the main ManagedITK project, under either the ComposeFilters or
ResizeFilters module group. Once complete, I would be happy to include
it in the ManagedITK repository (or even better, I can grant you
access and you can commit the new wrapping yourself once complete :D).

To help you on your way, I think the wrapping file should be something
like below (disclaimer: due to time constraints I have not compiled
this, just typed it in an email, it may not work out-of-the-box).

Alternatively, you may consider using the already wrapped
itkExtractImageFilter (in ResizeFilters) which provides pretty much
the same functionality.

HTH

Cheers, Dan

==========================
WRAP_CLASS("itk::RegionOfInterestImageFilter")

  WRAP_IMAGE_FILTER_SIGN_INT(2)
  WRAP_IMAGE_FILTER_REAL(2)

    BEGIN_MANAGED_PROPERTY("RegionOfInterest" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY "Get/set the region to extract.")
    SET(MANAGED_PROPERTY_TYPE "itkImageRegion^")
    SET(MANAGED_PROPERTY_GET_BODY "return
itk::ManagedTypes::ToManagedImageRegion<NativeType::ImageDimension>(
m_PointerToNative->GetRegionOfInterest() ) );")
    SET(MANAGED_PROPERTY_SET_BODY
"m_PointerToNative->SetRegionOfInterest(
itk::ManagedTypes::ToNativeImageRegion<NativeType::ImageDimension>(
value ) );")
  END_MANAGED_PROPERTY()

END_WRAP_CLASS()
==========================

On 19 May 2010 15:28, Carl Bateman <Carl.Bateman at icr.ac.uk> wrote:
> Hi,
>
> my attempts to wrap the RegionOfInterestImageFilter continue...
>
> Is is necessary to create an empty project with CMake then add the code for the filter, or to write a dll first then use CMake?
>
> pp 31 of ManagedITK: .NET Wrappers for ITK refers to group and sub-group - "Image" and "Topology" but they don't occur in the succeeding listing. What gives?
>
> TIA
>
> Carl
>
>
> The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.
>


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.


More information about the Insight-users mailing list