[Insight-users] ITK function problem
Ashish Poddar
ahpoddar at gmail.com
Thu Jan 6 20:31:18 EST 2005
probably if you can send the cmakelists.txt file... it would explain
the problem better...
regards,
Ashish.
On Thu, 6 Jan 2005 14:38:01 -0900, RJ Stevens <rj.stevens at gmail.com> wrote:
> I am using ITK 1.8 on a suse 9.2 system. I have set the correct ITK
> directory for cmake, but the ITK funtions are giving errors as
> undefined functions. My program is a simple image file creator based
> on the image 2 example. I am also getting errors for unsigned chars. I
> get errors on every step of the make process. It seems like the
> compiler doesn't know where to link to even though its been
> configured.
>
> Thanks in advance for any advice. here is my code:
>
> #include "itkImage.h"
> #include "itkImageFileReader.h"
> #include <iostream>
>
> int main(int , char ** argv)
> {
>
> //define variables for image def
> typedef unsigned char PixelType;
> const unsigned int Dimension = 2;
>
> //set pixel type and dimension
> typedef itk::Image< PixelType, Dimension > ImageType;
>
> //instantiate the image reader class
> typedef itk::ImageFileReader< ImageType > ReaderType;
>
> //use reader class to create a reader object
> ReaderType::Pointer reader = ReaderType::New();
>
> //give reader oject filename of image to be loaded into memory
> const char * filename = argv[1];
> reader->SetFileName(filename);
>
> //reader object is a pipeline source object and responds to pipeline
> //update requests. Since this pipeline is of length 1, we must send the
> //update reqest manually
> reader->Update();
>
> //put the image into an image object
> ImageType::Pointer image = reader -> GetOutput();
>
> return 0;
> }
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
--
Ashish Poddar
Y! - ashish_poddar | MSN - ashish_poddar at yahoo.com
- If you expect nothing, nothing is unexpected.
- If you expect everything, everything is as expected.
More information about the Insight-users
mailing list