Hi Ivo,

thanks for your reply!

I've built a simple filter chain to register two images using ITK 
modules. So I load those images in MITK and pass them to the
AccessTwoImagesFixedDimensionByItk function. I guess I could also use 
the mitk::CastToItkImage function to convert the images and use a 
different access template, but I think this would copy the data 
internally. Is this true or is there another way to avoid the big .obj 
files?

thanks,
Marius


Ivo Wolf wrote:
> Hi Marius,
>
> AccessTwoImagesFixedDimensionByItk has indeed to create quite a lot
> of code: since the function to call is templated over two unknown image
> types, the access macro creates code for all common types (which are 8:
> char, short, int, and the respective unsigned versions, as well as float
> and
> double) *times* that number, i.e., 8x8=64!
> (see
> http://www.mitk.org/documentation/mitk-0.8/group__Adaptor.html#g0f12c9f206cd8e385bfaaff8afeb73c7
> and click on _accessTwoImagesAllTypesByItk and then on _accessTwoImagesByItk
> and then on _accessTwoImagesByItk2).
>
> That is the reason that we rarely use this access method. Normally it is
> sufficient to use the macros for a single image. So what exactly does your
> ITK filter chain do? Or do you even know the pixel type(s) that your
> images will have?
>
> For larger filter chains similar problems even occur for single images.
> Therefore, we have implemented  workarounds for these cases (but
> currently they work only for the single image versions). One is to
> explicitly instantiate the function to call in separate .cpp files for parts
> of the image types (currently there are macros for splitting w.r.t. the
> image dimension). There is an example in the second half of the page
> describing the tutorial step 6
> http://www.mitk.org/documentation/mitk-0.8/Step6Page.html
> (line starts with the words "Additionally the access function has to be
> instantiated").
> Another workaround is to reduce the number of common types that
> should be supported. There is a cmake-macro for that purpose.
> Currently, this works only for the ...FixedPixelType versions of the
> access methods (afaik).
>
> Best regards,
>
> Ivo
>
> Marius Erdt wrote:
>   
>> Hi all,
>>
>> I was using one of the MITK templates like 
>> "AccessTwoImagesFixedDimensionByItk" to implement some ITK filter 
>> chains, when VS2005 came up with the error message
>>
>> Error C1128, number of sections exceeded object file format limit
>>
>> increasing the number of sections in the .obj. file with the /bigobj 
>> command solved the problem. However, this only works with VS2005 or later.
>>
>> Did some of you experienced similar problems when using ITK filter 
>> chains? I'm just confused, because I was not using many ITK filters 
>> (like 4 or 5) and those templates should generally not cause any 
>> problems. However, I don't know what MITK does with the templates 
>> internally, so maybe there is a way to circumvent this behavior.
>>
>> Regards,
>> Marius
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>   
>>     
>
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to