[Insight-users] Using GDCM classes with ITK

Karthik Krishnan Karthik.Krishnan at kitware.com
Tue May 16 11:02:58 EDT 2006


The VTK Tcl wrapper wraps only a limited number of types and objects. 
Here is how you would write your header file


#include "vtkObject.h"
#include "gdcmFile.h"

class VTK_EXPORT vtkFoo : public vtkObject
{
public:
  static vtkFoo * New();
  vtkTypeRevisionMacro(vtkVVDicomTagPrinter,vtkObject);
  void PrintSelf(ostream& os, vtkIndent indent);

  ...

//BTX
  gdcm::File *header;
//ETX

};

You cannot put non-VTK objects outside the BTX/ETX tags. (Stuff within 
these tags is ignored by the vtk-tcl parser). Most VTK objects and 
native types (except bool) should be wrapped and can be safely left 
outside the BTX/ETX tags.

HTH,
Karthik

Łukasz Tutaj wrote:

> Hello,
>
> I'm newbye in ITK so please be patient. I want to use some gdcm 
> classes with ITK for example gdcmDicomDir to create 
> patient/study/serie tree. How should I configure my project in VS 
> 2003. I tried to do it alone and using cmake I added all libs and 
> lib/include directories (in my project there is itkgdcm.lib). I also 
> use "gdcm/src/... .h" way of including headers. But during compilation 
> I got error: *** SYNTAX ERROR found in parsing the header file 
> .../.../vtkKWMVSimpleImageHeaderViewer.h before line 10 ***
> The part of this header file is:
> //*********
> #ifndef __vtkKWMVSimpleImageHeaderViewer_h
> #define __vtkKWMVSimpleImageHeaderViewer_h
>
> #include "vtkKWObject.h"
> #include "KWMedicalViewerWin32Header.h"
>
> #include "gdcm/src/gdcmFile.h"
>
> class vtkKWMultiColumnList;
> class gdcm::File;    // *line 10
>
> *...
> #endif
> //*************
> In other header where I use gdcm classes I found the same errors in 
> lines where was some gdcm stuff like in line 10.
> Could someone help me with these? Thanks for any help.
> Łukasz Tutaj
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list