[Insight-users] Design question when using ITK classes
Luis Ibanez
luis.ibanez at kitware.com
Wed Feb 20 09:58:24 EST 2008
Hi Anja,
You may find useful to look at the following Insight Journal paper
that describes how to create a reader that internally contains
instantiations for multiple pixel types.
http://insight-journal.org/midas/handle.php?handle=1926/495
As with all papers in the Insight Journal:
Source code and examples are included.
This is not, of course, the only way to approach this problem,
but at least it will show you one possible way to deal with it.
Regards,
Luis
---------------------
Anja Ende wrote:
> Hi everyone,
>
> A quick question about using ITK classes. I am using C++ and am having a
> bit of trouble understanding how I can use the templated classes without
> instantiating for every possible type combination.
>
> A simple example:
>
> I have a custom file reader where the data type and dimensions are
> something that is only available at run time..
>
> So, now if I want to have a class member that uses a reader, I have to
> somehow define these template parameters at runtime... What I wanted was
> to have one reader which has one instance of the ImageImportFilter
> instance. However, to declare this class I need to define the template
> parameters for the ImportImageFilter at design time. So, now if a file
> is inputted with a different input data type and a dimension, I am stuck!
>
> Any ideas??
>
> Cheers,
>
> Anja
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list