[Insight-users] [ITK Community] newbie C++ question
Dženan Zukić
dzenanz at gmail.com
Thu Jan 9 04:26:17 EST 2014
It says that read_image<enum itk::ImageIOBase::IOComponentType> is not
implemented. Only 1 type is mentioned, which means that your signature
should not have 2 typenames.
On Thu, Jan 9, 2014 at 10:21 AM, Massinissa Bandou <
Massinissa.Bandou at usherbrooke.ca> wrote:
> 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.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140109/79c08a24/attachment.htm>
More information about the Insight-users
mailing list