[Insight-users] C++ question

Luke Bloy luke.bloy at gmail.com
Wed Sep 24 10:55:23 EDT 2008


Hi All,

I'm not, by a long shot, a c++ guru so i have perhaps a pretty basic 
question.

I'd like to be able to do something like this...

int main(int argc, char** argv)
{
     typedef double                                                      
PixelType;
     unsigned int dimension = 4;

     typedef itk::Image<PixelType, dimension>        ImageType;
}

This won't compile because dimension isn't const. Ideally i'd like this 
to be passed in as a command line argument. Is there a way to get around 
the typedef?

Thanks for any help.
-Luke


More information about the Insight-users mailing list