Re: Compiler

  • From: Vladimir Voskresensky - Oracle < >
  • To:
  • Subject: Re: Compiler
  • Date: Thu, 31 May 2012 21:41:22 +0400

There are some differences between compiler.
What is your NB compiler? GNU?

btw, from:
http://www.vtk.org/pipermail/vtkusers/2007-April/090695.html
--------
vtkImageData is a subclass of vtkDataObject; your code is probably not
compiling because you haven't included vtkImageData.h.
---------

Hope it helps,
Vladimir.

On 30.05.12 23:57, Massinissa wrote:
Hi
Let's make an example, I'm using VTk libraries, it's not necessary if you 
don't or you never use VTK, and I have a little problem. I've never had this 
under Visual Studio 2010.
Example of my code:
In Visual Studio
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
reader->SetFileName(DICOMImage);
reader->Update();
vtkImageCast *imageCast = vtkImageCast::New();
imageCast->SetInput(reader->GetOutput());

SetInput is a function which take (vtkDataObject*) and GetOutput is a 
(vtkImageData*)
I don't have any trouble with VS, I mean it compiles and it works.
When it comes to NetBeans, I have to specify the SetInput by writing this:

vtkImageCast *imageCast = vtkImageCast::New();
imageCast->SetInput((vtkDataObject *)reader->GetOutput());

I really don't know why I have to do this. Is there something related to the 
compiler?

Thank you for your help!

Massinissa






Compiler

Massinissa 05/30/2012

Re: Compiler

Vladimir Voskresensky - Oracle 05/31/2012

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 131 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close