//--------------------------------------------------------------------
template<class ImageType1, class ImageType2>
- bool HasSameSizeAndSpacing(typename ImageType1::ConstPointer A,
+ bool HaveSameSizeAndSpacing(typename ImageType1::ConstPointer A,
typename ImageType2::ConstPointer B);
template<class ImageType1, class ImageType2>
- bool HasSameSizeAndSpacing(typename ImageType1::Pointer A,
+ bool HaveSameSizeAndSpacing(typename ImageType1::Pointer A,
typename ImageType2::Pointer B);
+ //--------------------------------------------------------------------
+ template<class ImageType1, class ImageType2>
+ bool HaveSameSpacing(typename ImageType1::ConstPointer A,
+ typename ImageType2::ConstPointer B);
+
+ template<class ImageType1, class ImageType2>
+ bool HaveSameSpacing(typename ImageType1::Pointer A,
+ typename ImageType2::Pointer B);
+
#include "clitkImageCommon.txx"
} // end namespace
//--------------------------------------------------------------------
template<class ImageType1, class ImageType2>
-bool HasSameSizeAndSpacing(typename ImageType1::ConstPointer A,
+bool HaveSameSizeAndSpacing(typename ImageType1::ConstPointer A,
typename ImageType2::ConstPointer B)
{
if (A->GetImageDimension() != B->GetImageDimension()) return false;
//--------------------------------------------------------------------
template<class ImageType1, class ImageType2>
-bool HasSameSizeAndSpacing(typename ImageType1::Pointer A,
+bool HaveSameSizeAndSpacing(typename ImageType1::Pointer A,
typename ImageType2::Pointer B)
{
if (A->GetImageDimension() != B->GetImageDimension()) return false;
}
//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+template<class ImageType1, class ImageType2>
+bool HaveSameSpacing(typename ImageType1::ConstPointer A,
+ typename ImageType2::ConstPointer B)
+{
+ if (A->GetImageDimension() != B->GetImageDimension()) return false;
+ for(unsigned int i=0; i<A->GetImageDimension(); i++) {
+ if (A->GetSpacing()[i] != B->GetSpacing()[i]) return false;
+ }
+ return true;
+}
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+template<class ImageType1, class ImageType2>
+bool HaveSameSpacing(typename ImageType1::Pointer A,
+ typename ImageType2::Pointer B)
+{
+ if (A->GetImageDimension() != B->GetImageDimension()) return false;
+ for(unsigned int i=0; i<A->GetImageDimension(); i++) {
+ if (A->GetSpacing()[i] != B->GetSpacing()[i]) return false;
+ }
+ return true;
+}
+//--------------------------------------------------------------------
+
#endif /* end #define CLITKIMAGECOMMON_TXX */