[Insight-developers] std::vector inide ImportImageContainer
Karthik Krishnan
Karthik.Krishnan at kitware.com
Mon Sep 11 10:10:37 EDT 2006
My guess would be cause the std namespace wasn't all that well supported
on all compilers back then. For sure, vector< bool > will not compile on
VS6 due to the lack of support for partial specialization on the compiler.
-karthik
Henning Meyer wrote:
> Hello,
>
> I'm wondering why ImportImageContainer does not use std::vector and
> its iterator.
> Instead everywhere I see raw pointers and allocations via new.
> What was the reason for this decision?
> Is it feasable to modify everything to support std::vector (or even a
> generic random accessable container)?
> Where would be the difficult points? What would the drawbacks be?
>
> I would really like to do this, because then I could have an
> itk::Image< bool, 3 > why simply uses just one bit per pixel instead
> of 8 bits (due to partial specialization inside STL for std::vector<
> bool >).
> Also I think it could be quite easy then to create sparse image
> support ( with std::map< OffsetType, PixelType > inside the container
> ).
>
> What do you think about this?
> When using std::vector there shouldn't be any performance drawbacks...
>
> Henning
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
More information about the Insight-developers
mailing list