Skip to content

Commit 9a9d214

Browse files
author
Simon Rit
committed
ENH: wrap RTK image IO
Fixes RTKConsortium#295
1 parent df54c6f commit 9a9d214

19 files changed

+188
-1
lines changed

include/rtkHncImageIOFactory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifndef rtkHncImageIOFactory_h
2020
#define rtkHncImageIOFactory_h
2121

22+
#include "RTKExport.h"
2223
#include "rtkHncImageIO.h"
2324

2425
// itk include

itk-module.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ itk_module(RTK
5252
${RTK_DEPENDS}
5353
TEST_DEPENDS
5454
${RTK_TEST_DEPENDS}
55+
FACTORY_NAMES
56+
ImageIO::DCMImagX
57+
ImageIO::His
58+
ImageIO::Hnc
59+
ImageIO::Hnd
60+
ImageIO::ImagX
61+
ImageIO::Ora
62+
ImageIO::Xim
63+
ImageIO::XRad
5564
DESCRIPTION
5665
"${DOCUMENTATION}"
5766
)

src/rtkDCMImagXImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,23 @@ rtk::DCMImagXImageIOFactory::DCMImagXImageIOFactory()
2727
true,
2828
itk::CreateObjectFunction<DCMImagXImageIO>::New());
2929
}
30+
31+
// Undocumented API used to register during static initialization.
32+
// DO NOT CALL DIRECTLY.
33+
34+
namespace itk
35+
{
36+
37+
static bool DCMImagXImageIOFactoryHasBeenRegistered;
38+
39+
void RTK_EXPORT
40+
DCMImagXImageIOFactoryRegister__Private()
41+
{
42+
if (!DCMImagXImageIOFactoryHasBeenRegistered)
43+
{
44+
DCMImagXImageIOFactoryHasBeenRegistered = true;
45+
rtk::DCMImagXImageIOFactory::RegisterOneFactory();
46+
}
47+
}
48+
49+
} // end namespace itk

src/rtkHisImageIOFactory.cxx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,28 @@
2020

2121
#include <fstream>
2222

23-
//====================================================================
2423
rtk::HisImageIOFactory::HisImageIOFactory()
2524
{
2625
this->RegisterOverride(
2726
"itkImageIOBase", "HisImageIO", "His Image IO", true, itk::CreateObjectFunction<HisImageIO>::New());
2827
}
28+
29+
// Undocumented API used to register during static initialization.
30+
// DO NOT CALL DIRECTLY.
31+
32+
namespace itk
33+
{
34+
35+
static bool HisImageIOFactoryHasBeenRegistered;
36+
37+
void RTK_EXPORT
38+
HisImageIOFactoryRegister__Private()
39+
{
40+
if (!HisImageIOFactoryHasBeenRegistered)
41+
{
42+
HisImageIOFactoryHasBeenRegistered = true;
43+
rtk::HisImageIOFactory::RegisterOneFactory();
44+
}
45+
}
46+
47+
} // end namespace rtk

src/rtkHncImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,23 @@ rtk::HncImageIOFactory::HncImageIOFactory()
2626
this->RegisterOverride(
2727
"itkImageIOBase", "HncImageIO", "Hnc Image IO", 1, itk::CreateObjectFunction<HncImageIO>::New());
2828
}
29+
30+
// Undocumented API used to register during static initialization.
31+
// DO NOT CALL DIRECTLY.
32+
33+
namespace itk
34+
{
35+
36+
static bool HncImageIOFactoryHasBeenRegistered;
37+
38+
void RTK_EXPORT
39+
HncImageIOFactoryRegister__Private()
40+
{
41+
if (!HncImageIOFactoryHasBeenRegistered)
42+
{
43+
HncImageIOFactoryHasBeenRegistered = true;
44+
rtk::HncImageIOFactory::RegisterOneFactory();
45+
}
46+
}
47+
48+
} // end namespace itk

src/rtkHndImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,23 @@ rtk::HndImageIOFactory::HndImageIOFactory()
2626
this->RegisterOverride(
2727
"itkImageIOBase", "HndImageIO", "Hnd Image IO", true, itk::CreateObjectFunction<HndImageIO>::New());
2828
}
29+
30+
// Undocumented API used to register during static initialization.
31+
// DO NOT CALL DIRECTLY.
32+
33+
namespace itk
34+
{
35+
36+
static bool HndImageIOFactoryHasBeenRegistered;
37+
38+
void RTK_EXPORT
39+
HndImageIOFactoryRegister__Private()
40+
{
41+
if (!HndImageIOFactoryHasBeenRegistered)
42+
{
43+
HndImageIOFactoryHasBeenRegistered = true;
44+
rtk::HndImageIOFactory::RegisterOneFactory();
45+
}
46+
}
47+
48+
} // end namespace itk

src/rtkImagXImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,23 @@ rtk::ImagXImageIOFactory::ImagXImageIOFactory()
2424
this->RegisterOverride(
2525
"itkImageIOBase", "ImagXImageIO", "ImagX Image IO", true, itk::CreateObjectFunction<ImagXImageIO>::New());
2626
}
27+
28+
// Undocumented API used to register during static initialization.
29+
// DO NOT CALL DIRECTLY.
30+
31+
namespace itk
32+
{
33+
34+
static bool ImagXImageIOFactoryHasBeenRegistered;
35+
36+
void RTK_EXPORT
37+
ImagXImageIOFactoryRegister__Private()
38+
{
39+
if (!ImagXImageIOFactoryHasBeenRegistered)
40+
{
41+
ImagXImageIOFactoryHasBeenRegistered = true;
42+
rtk::ImagXImageIOFactory::RegisterOneFactory();
43+
}
44+
}
45+
46+
} // end namespace itk

src/rtkOraImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,23 @@ rtk::OraImageIOFactory::OraImageIOFactory()
2626
this->RegisterOverride(
2727
"itkImageIOBase", "OraImageIO", "Ora Image IO", true, itk::CreateObjectFunction<OraImageIO>::New());
2828
}
29+
30+
// Undocumented API used to register during static initialization.
31+
// DO NOT CALL DIRECTLY.
32+
33+
namespace itk
34+
{
35+
36+
static bool OraImageIOFactoryHasBeenRegistered;
37+
38+
void RTK_EXPORT
39+
OraImageIOFactoryRegister__Private()
40+
{
41+
if (!OraImageIOFactoryHasBeenRegistered)
42+
{
43+
OraImageIOFactoryHasBeenRegistered = true;
44+
rtk::OraImageIOFactory::RegisterOneFactory();
45+
}
46+
}
47+
48+
} // end namespace itk

src/rtkXRadImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,23 @@ rtk::XRadImageIOFactory::XRadImageIOFactory()
2424
this->RegisterOverride(
2525
"itkImageIOBase", "XRadImageIO", "XRad Image IO", true, itk::CreateObjectFunction<XRadImageIO>::New());
2626
}
27+
28+
// Undocumented API used to register during static initialization.
29+
// DO NOT CALL DIRECTLY.
30+
31+
namespace itk
32+
{
33+
34+
static bool XRadImageIOFactoryHasBeenRegistered;
35+
36+
void RTK_EXPORT
37+
XRadImageIOFactoryRegister__Private()
38+
{
39+
if (!XRadImageIOFactoryHasBeenRegistered)
40+
{
41+
XRadImageIOFactoryHasBeenRegistered = true;
42+
rtk::XRadImageIOFactory::RegisterOneFactory();
43+
}
44+
}
45+
46+
} // end namespace itk

src/rtkXimImageIOFactory.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,23 @@ rtk::XimImageIOFactory::XimImageIOFactory()
2626
this->RegisterOverride(
2727
"itkImageIOBase", "XimImageIO", "Xim Image IO", true, itk::CreateObjectFunction<XimImageIO>::New());
2828
}
29+
30+
// Undocumented API used to register during static initialization.
31+
// DO NOT CALL DIRECTLY.
32+
33+
namespace itk
34+
{
35+
36+
static bool XimImageIOFactoryHasBeenRegistered;
37+
38+
void RTK_EXPORT
39+
XimImageIOFactoryRegister__Private()
40+
{
41+
if (!XimImageIOFactoryHasBeenRegistered)
42+
{
43+
XimImageIOFactoryHasBeenRegistered = true;
44+
rtk::XimImageIOFactory::RegisterOneFactory();
45+
}
46+
}
47+
48+
} // end namespace itk

wrapping/rtkDCMImagXImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::DCMImagXImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::DCMImagXImageIOFactory" POINTER)

wrapping/rtkEdfImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::EdfImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::EdfImageIOFactory" POINTER)

wrapping/rtkHisImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::HisImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::HisImageIOFactory" POINTER)

wrapping/rtkHncImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::HncImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::HncImageIOFactory" POINTER)

wrapping/rtkHndImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::HndImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::HndImageIOFactory" POINTER)

wrapping/rtkImagXImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::ImagXImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::ImagXImageIOFactory" POINTER)

wrapping/rtkOraImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::OraImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::OraImageIOFactory" POINTER)

wrapping/rtkXRadImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::XRadImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::XRadImageIOFactory" POINTER)

wrapping/rtkXimImageIO.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
itk_wrap_simple_class("rtk::XimImageIO" POINTER)
2+
itk_wrap_simple_class("rtk::XimImageIOFactory" POINTER)

0 commit comments

Comments
 (0)