Skip to content

Commit

Permalink
COMP: Remove sys/time.h header.
Browse files Browse the repository at this point in the history
This is not found in Windows.  itk::TimeProbe is a cross-platform replacement.
 This was used for debug code, so that was removed.
  • Loading branch information
thewtex committed Jun 24, 2015
1 parent 5acac6c commit df4ff1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions include/itkLinearAnisotropicDiffusionLBRImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class LinearAnisotropicDiffusionLBRImageFilter:
itkGetConstMacro(EffectiveDiffusionTime, ScalarType);
itkGetConstMacro(EffectiveNumberOfTimeSteps, int);

itkGetConstMacro(SparseMatrixAssemblyTimeCost, ScalarType);
itkGetConstMacro(IterationsTimeCost, ScalarType);
protected:
LinearAnisotropicDiffusionLBRImageFilter();
virtual ~LinearAnisotropicDiffusionLBRImageFilter(){}
Expand Down Expand Up @@ -148,8 +146,6 @@ class LinearAnisotropicDiffusionLBRImageFilter:

InternalSizeT OutsideBufferIndex() const {return NumericTraits<InternalSizeT>::max();}

ScalarType m_SparseMatrixAssemblyTimeCost, m_IterationsTimeCost;

struct StencilFunctor;
struct FunctorType;

Expand Down
16 changes: 1 addition & 15 deletions include/itkLinearAnisotropicDiffusionLBRImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include "itkMinimumMaximumImageCalculator.h"
#include "itkCastImageFilter.h"
#include "itkExtractImageFilter.h"
#include "sys/time.h"


#include "itkUnaryFunctorWithIndexImageFilter.h"
#include "itkTernaryFunctorImageFilter.h"
Expand Down Expand Up @@ -90,22 +88,10 @@ void
LinearAnisotropicDiffusionLBRImageFilter< TImage, TScalar >
::GenerateData()
{
timeval start;
timeval end;
gettimeofday(&start, NULL); // nullptr is not accepted by older compilers

GenerateStencils();
this->UpdateProgress(0.5);

gettimeofday(&end, NULL);
m_SparseMatrixAssemblyTimeCost = (end.tv_sec-start.tv_sec)+(end.tv_usec-start.tv_usec)/1000000.;
start=end;


ImageUpdateLoop();

gettimeofday(&end, NULL);
m_IterationsTimeCost = (end.tv_sec-start.tv_sec)+(end.tv_usec-start.tv_usec)/1000000.;
this->ImageUpdateLoop();
}

// **************************** Computation ***********************
Expand Down

0 comments on commit df4ff1e

Please sign in to comment.