[Insight-users] [ITK Community] newbie C++ question
Massinissa Bandou
Massinissa.Bandou at USherbrooke.ca
Thu Jan 9 04:21:19 EST 2014
Hi Dženan Zukić
I tried the example
<http://www.itk.org/Wiki/ITK/Examples/IO/ReadUnknownImageType> and I want
to know what's wrong with this following code?
int main(){
typedef itk::ImageIOBase::IOComponentType ScalarPixelType;
itk::ImageIOBase::Pointer imageIO =
itk::ImageIOFactory::CreateImageIO("myImage.mhd",itk::ImageIOFactory::ReadMode);
imageIO->SetFileName("myImage.mhd");
imageIO->ReadImageInformation();
const ScalarPixelType pixelType = imageIO->GetComponentType();
myClass *a = new myClass;
a->Read_Image(pixelType,pixelType);
}
myClass
{
template <typename TYPE1,typename TYPE2>
void Read_Image(TYPE1 input1, TYPE2 input2)
{
typedef itk::Image< input1, 3 > ImageType1;
typedef itk::Image< input2, 3 > ImageType2;
...
...
}
};
and I got an error:
*Error 13 error LNK2019: unresolved external symbol "public: void __cdecl
myClass::Read_Image<enum itk::ImageIOBase::IOComponentType>(enum
itk::ImageIOBase::IOComponentType)" *
I'd appreciate your help!
Massi
--
View this message in context: http://itk-users.7.n7.nabble.com/newbie-C-question-tp33081p33154.html
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list