[vtkusers] adding a member method to a vtk class

listboss listboss at gmail.com
Wed Oct 13 13:01:23 EDT 2004


Thanks Leila for the hints...

As I said, I am trying to avoid creating a complete new class and
introduce it to vtk.

Maybe it's better that I added my methods to vtkImageReader class
rather than keeping them in a seperate file/class.

I'll try your suggestions and keep the list posted about the outcome.

Thanks again
Hamid



On 13 Oct 2004 12:48:14 -0400, Leila Baghdadi <baghdadi at sickkids.ca> wrote:
> Hi Hamid
> 
> you should try modifying CMakeList.txt if you are adding new classes,
> 
> I think it is better to make your methods available in the class itself!
> 
> try looking at the directory
> VTK/Examples/Build/vtkLocal
> 
> you can place your class in the above directory, there is a
> CMakeLists.txt file in the above directory which is good enough to get
> you started,
> 
> HTH
> 
> Leila
> 
> 
> 
> On Wed, 2004-10-13 at 12:27, listboss wrote:
> > Hi
> >
> > I have added a member function to vtkImageReader class. This new
> > function needs methods which are available in myclass.cpp
> >
> > To compile my modified vtkImageReader class, first I tried to add
> > myclass.cpp to the CMakeList.txt file located in IO folder, but the
> > linker complained about a missing instantiator !!! :(
> >
> > I removed the file from CMakeList.txt and I opened VisualStudio .Net,
> > right clicked on IO and selected "Add New Class" and then I added
> > "myclass.cpp" to "IO".
> > It compiles fine but my question is "Is it right way of doing this ?"
> >
> > Am I gonna see problems because how I am doing this, or it's just fine ?
> > How should I do this if I want to compile VTK under Linux ?
> >
> > Thanks in advance
> > Hamid
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> 
>



More information about the vtkusers mailing list