[vtkusers] error: invalid static_cast from type 'int' to type 'const itk::Image<unsigned char, 3u>*'

charfeddine amir charfeddine_amir at yahoo.fr
Sat Jan 14 08:16:37 EST 2006


hi Luis
 thx for your smart answer,
 i downloaded the myITKgui package from http://www.vialab.org/methods_course/myITKgui.zip
 when i posted my question, i thinked that this package was knowed by a lot of people using ITK and VTK packages, that's why i didn't attach line of code including the line where the error was produced.
 this a fragment of the file /usr/local/myITKgui/migAppBase.cxx from line 240 :
       
 void migAppBase ::CreateInputImageVTKPipeline(vtkFlRenderWindowInteractor *flrwi) {   // Abort if the user is being stupid   if(m_InputImage==0) //<-------line 246     return;    // create a rendering window and renderer   m_InputRenderer = vtkRenderer::New();   m_InputRenderer->SetBackground(0.0, 0.0, 0.0);      m_InputRenderWindow = vtkRenderWindow::New();   m_InputRenderWindow->AddRenderer(m_InputRenderer);
  ......

i find a message posted in the pipermail on this link
http://public.kitware.com/pipermail/insight-users/2005-December/015838.html
did we find the same error ?
i'm ready for more details,
thx again
Amir.


 
Luis Ibanez <luis.ibanez at kitware.com> a écrit : 
Hi Amir,


      We may need to look at the code that
      you wrote in your file migAppBase.cxx     :-)



      It seems that you are attempting to assign
      an integer to a SmartPointer of an image.

      That will not work....


      Please be nice to us and share with mailing
      list the lines of code around line 246 of
      your file


         /usr/local/myITKgui/migAppBase.cxx


      We already tried hard to use our divinatory
      mental powers to guess what you may have
      written in that file...

      but given that today is almost Full Moon, and
      that we are too far from the Winter Solstice,
      our divinatory skills didn't work quite well.



       Best regards,


          Luis




---------------------
charfeddine amir wrote:
>  Hi All
> 
> while trying to build myITKgui package, i get error during build process :
> 
> /usr/local/include/InsightToolkit/Common/itkSmartPointer.h:90: error: 
> invalid static_cast from type 'int' to type 'const itk::Image
> char, 3u>*'
> /usr/local/include/InsightToolkit/Common/itkSmartPointer.h: In member 
> function 'bool itk::SmartPointer::operator==(R) const [with 
> R = int, TObjectType = itk::Image]':
> /usr/local/myITKgui/migAppBase.cxx:246:   instantiated from here
> /usr/local/include/InsightToolkit/Common/itkSmartPointer.h:86: error: 
> invalid static_cast from type 'int' to type 'const itk::Image
> char, 3u>*'
> make[1]: *** [migAppBase.o] Erreur 1
> make: *** [default_target] Erreur 2
> [root at timhpux myITKguibin]#
> 
> thankx for any help or comment.
> Amir.
> 




		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060114/a038e76b/attachment.htm>


More information about the vtkusers mailing list