Skip to content

Commit

Permalink
Merge topic 'BasicObjectMethodsMacroChecksRebased'
Browse files Browse the repository at this point in the history
7380d3b ENH: Perform class name checks in test macro
  • Loading branch information
thewtex authored and kwrobot committed Apr 28, 2016
2 parents 0bbd4b5 + 7380d3b commit 5b5a8b0
Show file tree
Hide file tree
Showing 22 changed files with 203 additions and 175 deletions.
4 changes: 2 additions & 2 deletions Modules/Core/Common/include/itkImageRegionSplitterDirection.h
Expand Up @@ -37,15 +37,15 @@ class ITKCommon_EXPORT ImageRegionSplitterDirection
public:
/** Standard class typedefs. */
typedef ImageRegionSplitterDirection Self;
typedef Object Superclass;
typedef ImageRegionSplitterBase Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;

/** Method for creation through the object factory. */
itkNewMacro(Self);

/** Run-time type information (and related methods). */
itkTypeMacro(ImageRegionSplitterDirection, Object);
itkTypeMacro(ImageRegionSplitterDirection, ImageRegionSplitterBase);

/** Get the direction in which not to split the image.*
*
Expand Down
Expand Up @@ -213,18 +213,6 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator:
/** Period parameter */
itkStaticConstMacro(M, unsigned int, 397);

/** Internal state. */
IntegerType state[StateVectorLength];

/** Next value to get from state. */
IntegerType *m_PNext;

/** Number of values left before reload is needed. */
int m_Left;

/** Seed value. */
IntegerType m_Seed;

/** Reload array with N new values. */
void reload();

Expand All @@ -243,6 +231,18 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator:

static IntegerType hash(time_t t, clock_t c);

// Internal state
IntegerType state[StateVectorLength];

// Next value to get from state
IntegerType *m_PNext;

// Number of values left before reload is needed
int m_Left;

// Seed value
IntegerType m_Seed;

private:

/** Internal method to actually create a new object. */
Expand Down
Expand Up @@ -24,9 +24,11 @@
int itkImageRegionSplitterDirectionTest(int, char*[])
{

itk::ImageRegionSplitterDirection::Pointer splitter = itk::ImageRegionSplitterDirection::New();
itk::ImageRegionSplitterDirection::Pointer splitter =
itk::ImageRegionSplitterDirection::New();

EXERCISE_BASIC_OBJECT_METHODS( splitter,ImageRegionSplitterDirection );
EXERCISE_BASIC_OBJECT_METHODS( splitter, ImageRegionSplitterDirection,
ImageRegionSplitterBase );

itk::ImageRegion<2> region;
region.SetSize(0, 10);
Expand Down
Expand Up @@ -24,16 +24,17 @@
int itkImageRegionSplitterMultidimensionalTest(int, char*[])
{

itk::ImageRegionSplitterMultidimensional::Pointer splitter = itk::ImageRegionSplitterMultidimensional::New();

EXERCISE_BASIC_OBJECT_METHODS( splitter,ImageRegionSplitterMultidimensional );
itk::ImageRegionSplitterMultidimensional::Pointer splitter =
itk::ImageRegionSplitterMultidimensional::New();

EXERCISE_BASIC_OBJECT_METHODS( splitter,
ImageRegionSplitterMultidimensional, ImageRegionSplitterBase );

itk::ImageRegion<2> region;
region.SetSize(0, 10);
region.SetSize(1, 11);

region.SetIndex(0,1);
region.SetIndex(0, 1);
region.SetIndex(1, 10);

const itk::ImageRegion<2> lpRegion = region;
Expand Down
Expand Up @@ -24,16 +24,17 @@
int itkImageRegionSplitterSlowDimensionTest(int, char*[])
{

itk::ImageRegionSplitterSlowDimension::Pointer splitter = itk::ImageRegionSplitterSlowDimension::New();

EXERCISE_BASIC_OBJECT_METHODS( splitter,ImageRegionSplitterSlowDimension );
itk::ImageRegionSplitterSlowDimension::Pointer splitter =
itk::ImageRegionSplitterSlowDimension::New();

EXERCISE_BASIC_OBJECT_METHODS( splitter,
ImageRegionSplitterSlowDimension, ImageRegionSplitterBase );

itk::ImageRegion<2> region;
region.SetSize(0, 10);
region.SetSize(1, 11);

region.SetIndex(0,1);
region.SetIndex(0, 1);
region.SetIndex(1, 10);

const itk::ImageRegion<2> lpRegion = region;
Expand Down

0 comments on commit 5b5a8b0

Please sign in to comment.