[Insight-users] BinaryImageType

Karthik Krishnan Karthik.Krishnan at kitware.com
Mon Jul 17 10:50:40 EDT 2006


Henning Meyer wrote:

> Thank you!
>
> 2006/7/14, Karthik Krishnan <Karthik.Krishnan at kitware.com>:
>
>> Henning Meyer wrote:
>>
>> > Hello,
>> >
>> > what would be needed to do in order implement a BinaryImageType< int
>> > dimension>, which uses all bits of its allocated memory, so that 32
>> > pixels can be stored inside a unsigned int.
>> > Would it just mean to have a specialization of Image< BinaryPixelType
>>
>> Yes. I would think so. The same happens in the C++ STL library for
>> std::vector
>
>
> Would it work with all filters? Which Methods inside itk::Image and
> itk::ImageIterator would need to be replaced? Would it work with all
> filters afterwards?
>
It would be *a lot* of work to get all the iterators and adaptors to 
handle it. You would have to specialize each one of them. A lot of 
iterators do smart things like image->GetBufferPointer() and then work 
with the raw pointer for a while..  or return an address that's an 
indexed offset from the raw pointer. This will not work in your case, 
since the offset will be 8 times the correct offset.

Are you running out of memory ? Did you look to see if there were 
duplicates, for instance forcing filters to release their bulk data by 
using the ReleaseDataFlag etc


> Henning
> _______________________________________________
> 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