Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shared library build #92

Merged
merged 2 commits into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/itkFrequencyExpandImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ FrequencyExpandImageFilter< TImageType >
typename TImageType::SizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize();
typename TImageType::IndexType inputOriginIndex = inputPtr->GetLargestPossibleRegion().GetIndex();
typename TImageType::SizeType outputSize = outputPtr->GetLargestPossibleRegion().GetSize();
FixedArray< bool, TImageType::ImageDimension > inputSizeIsEven;

const typename TImageType::IndexType indexRequested = outputPtr->GetLargestPossibleRegion().GetIndex();

Expand Down Expand Up @@ -273,7 +272,7 @@ FrequencyExpandImageFilter< TImageType >
typename TImageType::IndexType outputStartIndex;
typename TImageType::PointType outputOrigin;

typename TImageType::SpacingType inputOriginShift;
//typename TImageType::SpacingType inputOriginShift;
for ( unsigned int i = 0; i < TImageType::ImageDimension; i++ )
{
outputSpacing[i] = inputSpacing[i] / m_ExpandFactors[i];
Expand Down
1 change: 0 additions & 1 deletion include/itkFrequencyExpandViaInverseFFTImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ FrequencyExpandViaInverseFFTImageFilter< TImageType >
typename TImageType::IndexType outputStartIndex;
typename TImageType::PointType outputOrigin;

typename TImageType::SpacingType inputOriginShift;
for ( unsigned int i = 0; i < TImageType::ImageDimension; i++ )
{
outputSpacing[i] = inputSpacing[i] / m_ExpandFactors[i];
Expand Down
26 changes: 16 additions & 10 deletions include/itkRieszUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@
#ifndef itkRieszUtilities_h
#define itkRieszUtilities_h

#include <algorithm>
#include <functional>
#include <set>
#include <vector>
#include <functional>
#include <algorithm>

#include "itkMacro.h"

#include "IsotropicWaveletsExport.h"

namespace itk
{
namespace utils
{
/// Factorial
long
Factorial(long n);
IsotropicWavelets_EXPORT long Factorial(long n);

/**
* Compute number of components p(N, d), where N = Order, d = Dimension.
Expand All @@ -40,8 +43,9 @@ Factorial(long n);
*
* @return NumberOfComponents given the order for the ImageDimension.
*/
unsigned int
ComputeNumberOfComponents( const unsigned int & order, const unsigned int & dimension );
IsotropicWavelets_EXPORT
unsigned int ComputeNumberOfComponents( const unsigned int & order,
const unsigned int & dimension );

/**
* Compute all possible unique indices given the subIndex: (X, 0, ..., 0).
Expand All @@ -55,8 +59,8 @@ ComputeNumberOfComponents( const unsigned int & order, const unsigned int & dime
* @param init position to evaluate subIndex. Needed for recursion purposes.
*/
template< typename TIndicesArrayType, unsigned int VImageDimension >
void
ComputeUniqueIndices( TIndicesArrayType subIndex,
ITK_TEMPLATE_EXPORT
void ComputeUniqueIndices( TIndicesArrayType subIndex,
std::set< TIndicesArrayType, std::greater< TIndicesArrayType > > & uniqueIndices,
unsigned int init = 0 )
{
Expand Down Expand Up @@ -99,6 +103,7 @@ ComputeUniqueIndices( TIndicesArrayType subIndex,
* Compute all the permutations from a set of uniqueIndices.
*/
template< typename TIndicesArrayType >
ITK_TEMPLATE_EXPORT
std::set< TIndicesArrayType, std::greater< TIndicesArrayType > >
ComputeAllPermutations(
const std::set< TIndicesArrayType, std::greater< TIndicesArrayType > > & uniqueIndices)
Expand All @@ -124,6 +129,7 @@ ComputeAllPermutations(
* where \f$ \text{index}[i]>=0 \f$
*/
template< typename TIndicesArrayType, unsigned int VImageDimension >
ITK_TEMPLATE_EXPORT
std::set< TIndicesArrayType, std::greater< TIndicesArrayType > >
ComputeAllPossibleIndices(const unsigned int & order)
{
Expand All @@ -137,8 +143,8 @@ ComputeAllPossibleIndices(const unsigned int & order)
}

template< typename TIndicesArrayType, unsigned int VImageDimension >
bool
LessOrEqualIndiceComparisson(
ITK_TEMPLATE_EXPORT
bool LessOrEqualIndiceComparisson(
const TIndicesArrayType& rhs,
const TIndicesArrayType& lhs)
{
Expand Down
2 changes: 0 additions & 2 deletions include/itkShrinkDecimateImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ ShrinkDecimateImageFilter< TInputImage, TOutputImage >
const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize();
const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex();

ContinuousIndex< double, ImageDimension > inputIndexOutputOrigin;

typename TOutputImage::SpacingType outputSpacing(inputSpacing);
typename TOutputImage::SizeType outputSize;
typename TOutputImage::IndexType outputStartIndex;
Expand Down
13 changes: 8 additions & 5 deletions include/itkWaveletUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
#ifndef itkWaveletUtilities_h
#define itkWaveletUtilities_h

#include <vector>
#include <cmath>
#include <algorithm>
#include <cmath>
#include <vector>
#include <itkFixedArray.h>
#include <itkMath.h>
#include <itkSize.h>

#include "IsotropicWaveletsExport.h"

namespace itk
{
namespace utils
Expand All @@ -47,16 +49,17 @@ namespace utils
*
* Note that bands and levels are always >= 1. The level/bands returned here corresponds to an index.
*/
IndexPairType IndexToLevelBandSteerablePyramid(unsigned int linearIndex,
unsigned int levels, unsigned int bands);
IsotropicWavelets_EXPORT IndexPairType IndexToLevelBandSteerablePyramid(
unsigned int linearIndex, unsigned int levels, unsigned int bands);

/** Compute max number of levels depending on the size of the image.
* Return J: $ J = \text{min_element}\{J_0,\ldots, J_d\} $;
* where each $J_i$ is the number of integer divisions that can be done with the $i$ size and the scale factor.
* returns 1 if any size is not divisible by the scale factor.
*/
template < unsigned int VImageDimension >
unsigned int ComputeMaxNumberOfLevels(const Size< VImageDimension >& inputSize, const unsigned int & scaleFactor)
ITK_TEMPLATE_EXPORT unsigned int ComputeMaxNumberOfLevels(
const Size< VImageDimension >& inputSize, const unsigned int & scaleFactor)
{
FixedArray< unsigned int, VImageDimension > exponentPerAxis;
// The minimum level is 1.
Expand Down
14 changes: 7 additions & 7 deletions src/itkRieszUtilities.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,40 @@ ComputeNumberOfComponents(const unsigned int &order, const unsigned int &dimensi
}

// explicit instantiation of template functions with std::vector<unsigned int>
template
template<>
void
ComputeUniqueIndices<std::vector<unsigned int>, 3>(
std::vector<unsigned int> subIndex,
std::set< std::vector<unsigned int>, std::greater<std::vector<unsigned int> > > &uniqueIndices,
unsigned int init );

template
template<>
void
ComputeUniqueIndices<std::vector<unsigned int>, 2>(
std::vector<unsigned int> subIndex,
std::set< std::vector<unsigned int>, std::greater<std::vector<unsigned int> > > &uniqueIndices,
unsigned int init );

template
template<>
std::set< std::vector<unsigned int>, std::greater<std::vector<unsigned int> > >
ComputeAllPermutations<std::vector<unsigned int> >(
const std::set< std::vector<unsigned int>, std::greater<std::vector<unsigned int> > > & uniqueIndices);

template
template<>
std::set< std::vector<unsigned int>, std::greater<std::vector<unsigned int> > >
ComputeAllPossibleIndices<std::vector<unsigned int>, 3>(
const unsigned int &order);

template
template<>
std::set< std::vector<unsigned int>, std::greater<std::vector<unsigned int> > >
ComputeAllPossibleIndices<std::vector<unsigned int>, 2>(
const unsigned int &order);

template
template<>
bool
LessOrEqualIndiceComparisson<std::vector<unsigned int>, 3>(const std::vector<unsigned int> & rhs, const std::vector<unsigned int> & lhs);

template
template<>
bool
LessOrEqualIndiceComparisson<std::vector<unsigned int>, 2>(const std::vector<unsigned int> & rhs, const std::vector<unsigned int> & lhs);
} // end namespace utils
Expand Down
4 changes: 2 additions & 2 deletions src/itkWaveletUtilities.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ IndexPairType IndexToLevelBandSteerablePyramid(unsigned int linearIndex,
}

// Instantiation
template
template<>
unsigned int ComputeMaxNumberOfLevels<3>(const Size< 3 >& inputSize, const unsigned int & scaleFactor);

template
template<>
unsigned int ComputeMaxNumberOfLevels<2>(const Size< 2 >& inputSize, const unsigned int & scaleFactor);
} // end namespace utils
} // end namespace itk