Introduction:
-------------

This directory demonstrates how to organize a local source repository where local VTK classes can be compiled and wrapped into C++/Tcl/Java/Python libraries without interferring with the main VTK source dir.

It might be good thing to sort local classes into different 'package' directories like VTK does (Common, Rendering, Filtering, Imaging, IO, etc.). It prevents numerous dependencies problems and provides a better overview of the class hierarchy. 

 - this example enforces this 'package' organization by referring to a vtkBar class into the Common/ directory and a vtkImageFoo class into the Imaging/ directory (the later uses an instance of vtkBar to "work", thus demonstrating how CMake resolves dependencies between both directories).

Nevertheless, if you do not care about this ordering, you might just put your classes into the Unsorted/ directory, like the vtkBar2 class for example. By default, members of the Unsorted package will depend on all other packages and will be linked against all VTK packages too.

What you should do:
-------------------

- Copy this vtkMy directory to a different out-of-source place, and remove all CVS subdirs to avoid any accidental commit to the main VTK CVS.

- Fill the subdirs with your own classes. Remove the dummy classes if needed. For each CMakeList.txt in the package dirs, add or remove the class(es) pertaining to this directory (SOURCE_FILES command). Depending on the directory, your class must #include "vtkmy*Win32Header.h" (see dummy vlasses for example) and use the according VTK_MY_*_EXPORT macro after the 'class' keyword to ensure proper DLL build. 

- Run CMake as usual. Use your vtkMy local dir as source dir, and choose whatever build directory. Your VTK build- or install- directory should be found automatically.

- Build your repository.

- Add the path to your build-dir bin/ directory to your PATH environment variable, so these C++ and Tcl DLL can be found (if any).

- Add the path to your vtkMy/Wrapping/Tcl directory to your TCLLIBPATH environment variable. TCLLIBPATH is a space separated set of paths to Tcl libraries. Windows users should use forward slashes (/) instead of the usual backward slashes (\), and should surround the path by quotes (") if it contains any space.

Distribute or exchange your modules:
------------------------------------

Ideally, if you plan to exchange or distribute your modules then you should rename the vtkmy lib prefix to something more personal or unique. You might use your initials for example. In a nutshell, if you were to choose vtksb, then you should take care of the following:

  - Search for the vtkmy string and replace it with vtksb in all files.
  - In the same way, replace VTKMY by VTKSB.
  - Rename all vtkmy* files *and* directories to vtksb* (this should only concern files like vtkmy*Win32Header.h for example). 
  - In all *Win32Header.h files and VTK headers, change VTK_MY_*_EXPORT to VTK_SB_*_EXPORT. Sorry for the inconvenience, but the wrappers expect this symbol to start with VTK_, thus VTKMY_*_EXPORT could not be used.

Any prefix should work, but make sure that your class names start with 'vtk', otherwise the wrappers will fail (hence the vtksb or vtkmy prefix, not sbvtk or myvtk). A safe bet is to use something starting 'vtk' in a consistent way.
