Skip to content

Commit

Permalink
COMP: Remove ITK_DISALLOW_COPY_AND_MOVE from UserData struct's
Browse files Browse the repository at this point in the history
On GCC 12.2.2 (Debian):

/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx: In instantiation of ‘static void itk::ImageGridSampler<TInputImage>::MultiThreadedGenerateData(itk::MultiThreaderBase&, itk::ThreadIdType, const TInputImage&, const MaskType*, const typename Superclass::InputImageRegionType&, const SampleGridSpacingType&, std::vector<typename itk::ImageSamplerBase<TInputImage>::ImageSampleType>&) [with TInputImage = itk::Image<short int, 4>; itk::ThreadIdType = unsigned int; MaskType = itk::ImageMaskSpatialObject<4, unsigned char>; typename Superclass::InputImageRegionType = itk::ImageRegion<4>; Superclass = itk::ImageSamplerBase<itk::Image<short int, 4> >; SampleGridSpacingType = itk::Offset<4>; typename itk::ImageSamplerBase<TInputImage>::ImageSampleType = itk::ImageSample<itk::Image<short int, 4> >]’:
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx:277:30:   required from ‘void itk::ImageGridSampler<TInputImage>::GenerateData() [with TInputImage = itk::Image<short int, 4>]’
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx:253:1:   required from here
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx:212:12: error: no matching function for call to ‘itk::ImageGridSampler<itk::Image<short int, 4> >::UserData::UserData(<brace-enclosed initializer list>)’
  212 |   UserData userData{ inputImage,
      |            ^~~~~~~~
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note: candidate: ‘itk::ImageGridSampler<TInputImage>::UserData::UserData(itk::ImageGridSampler<TInputImage>::UserData&&) [with TInputImage = itk::Image<short int, 4>]’ (deleted)
  169 |     ITK_DISALLOW_COPY_AND_MOVE(UserData);
      |                                ^~~~~~~~
/home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:397:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’
  397 |   TypeName(TypeName &&) = delete;                  \
      |   ^~~~~~~~
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note:   candidate expects 1 argument, 4 provided
  169 |     ITK_DISALLOW_COPY_AND_MOVE(UserData);
      |                                ^~~~~~~~
/home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:397:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’
  397 |   TypeName(TypeName &&) = delete;                  \
      |   ^~~~~~~~
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note: candidate: ‘itk::ImageGridSampler<TInputImage>::UserData::UserData(const itk::ImageGridSampler<TInputImage>::UserData&) [with TInputImage = itk::Image<short int, 4>]’ (deleted)
  169 |     ITK_DISALLOW_COPY_AND_MOVE(UserData);
      |                                ^~~~~~~~
/home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:395:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’
  395 |   TypeName(const TypeName &) = delete;             \
      |   ^~~~~~~~
/home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note:   candidate expects 1 argument, 4 provided
  169 |     ITK_DISALLOW_COPY_AND_MOVE(UserData);
      |                                ^~~~~~~~
/home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:395:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’
  395 |   TypeName(const TypeName &) = delete;             \
      |   ^~~~~~~~
  • Loading branch information
thewtex committed Jul 19, 2024
1 parent ebb429a commit 4ac4ae5
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions Common/ImageSamplers/itkImageFullSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ class ITK_TEMPLATE_EXPORT ImageFullSampler : public ImageSamplerBase<TInputImage

struct UserData
{
ITK_DISALLOW_COPY_AND_MOVE(UserData);

const InputImageType & InputImage;
const MaskType * const Mask{};
std::vector<WorkUnit> WorkUnits{};
Expand Down
2 changes: 0 additions & 2 deletions Common/ImageSamplers/itkImageGridSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ class ITK_TEMPLATE_EXPORT ImageGridSampler : public ImageSamplerBase<TInputImage

struct UserData
{
ITK_DISALLOW_COPY_AND_MOVE(UserData);

const InputImageType & InputImage;
const MaskType * const Mask{};
const SampleGridSpacingType GridSpacing{};
Expand Down
2 changes: 0 additions & 2 deletions Common/ImageSamplers/itkImageRandomCoordinateSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ class ITK_TEMPLATE_EXPORT ImageRandomCoordinateSampler : public ImageRandomSampl
private:
struct UserData
{
ITK_DISALLOW_COPY_AND_MOVE(UserData);

const std::vector<InputImageContinuousIndexType> & m_RandomCoordinates;
const InputImageType & m_InputImage;
const InterpolatorType & m_Interpolator;
Expand Down
2 changes: 0 additions & 2 deletions Common/ImageSamplers/itkImageRandomSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ class ITK_TEMPLATE_EXPORT ImageRandomSampler : public ImageRandomSamplerBase<TIn
private:
struct UserData
{
ITK_DISALLOW_COPY_AND_MOVE(UserData);

const std::vector<double> & m_RandomNumberList;
const InputImageType & m_InputImage;
InputImageIndexType m_RegionIndex{};
Expand Down
2 changes: 1 addition & 1 deletion Common/ImageSamplers/itkImageRandomSamplerSparseMask.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomSamplerSparseMask : public ImageRandomSampl
private:
struct UserData
{
ITK_DISALLOW_COPY_AND_MOVE(UserData);
//ITK_DISALLOW_COPY_AND_MOVE(UserData);

const std::vector<ImageSampleType> & m_AllValidSamples;
const std::vector<size_t> & m_RandomIndices;
Expand Down

0 comments on commit 4ac4ae5

Please sign in to comment.