Verified Commit e85175ac authored by Flavien BRIDAULT-LOUCHEZ's avatar Flavien BRIDAULT-LOUCHEZ
Browse files

fix(build): correct build after merge

parent e0451915
Pipeline #155224 failed with stages
...@@ -20,31 +20,31 @@ ...@@ -20,31 +20,31 @@
* *
***********************************************************************/ ***********************************************************************/
#include "imageFilterOp/BresenhamLine.hpp" #include "filter/image/BresenhamLine.hpp"
#include <cmath> #include <cmath>
namespace imageFilterOp namespace sight::filter::image
{ {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
BresenhamLine::PathType BresenhamLine::draw(const ::fwDataTools::helper::MedicalImage::Orientation orientation, BresenhamLine::PathType BresenhamLine::draw(const data::tools::helper::MedicalImage::Orientation orientation,
const CoordinatesType& startCoord, const CoordinatesType& endCoord) const CoordinatesType& startCoord, const CoordinatesType& endCoord)
{ {
size_t dim0 = 0, dim1 = 1; size_t dim0 = 0, dim1 = 1;
switch(orientation) switch(orientation)
{ {
case ::fwDataTools::helper::MedicalImage::X_AXIS: case data::tools::helper::MedicalImage::X_AXIS:
dim0 = 1; dim0 = 1;
dim1 = 2; dim1 = 2;
break; break;
case ::fwDataTools::helper::MedicalImage::Y_AXIS: case data::tools::helper::MedicalImage::Y_AXIS:
dim0 = 0; dim0 = 0;
dim1 = 2; dim1 = 2;
break; break;
case ::fwDataTools::helper::MedicalImage::Z_AXIS: case data::tools::helper::MedicalImage::Z_AXIS:
dim0 = 0; dim0 = 0;
dim1 = 1; dim1 = 1;
break; break;
...@@ -98,4 +98,4 @@ BresenhamLine::PathType BresenhamLine::draw(const ::fwDataTools::helper::Medical ...@@ -98,4 +98,4 @@ BresenhamLine::PathType BresenhamLine::draw(const ::fwDataTools::helper::Medical
return result; return result;
} }
} // namespace imageFilterOp } // namespace sight::filter::image
...@@ -22,33 +22,32 @@ ...@@ -22,33 +22,32 @@
#pragma once #pragma once
#include "imageFilterOp//config.hpp" #include "filter/image//config.hpp"
#include <fwData/Image.hpp> #include <data/Image.hpp>
#include <data/tools/helper/MedicalImage.hpp>
#include <fwDataTools/helper/MedicalImage.hpp> namespace sight::filter::image
namespace imageFilterOp
{ {
/** /**
* @brief Static class to compute Bresenham lines in 3D images. * @brief Static class to compute Bresenham lines in 3D images.
* *
*/ */
class IMAGEFILTEROP_CLASS_API BresenhamLine class FILTER_IMAGE_CLASS_API BresenhamLine
{ {
public: public:
/// Voxel coordinate type. /// Voxel coordinate type.
typedef std::array< ::fwData::Image::IndexType, 3 > CoordinatesType; typedef std::array< data::Image::IndexType, 3 > CoordinatesType;
/// Series of coordinates making up a line. /// Series of coordinates making up a line.
typedef std::vector< CoordinatesType > PathType; typedef std::vector< CoordinatesType > PathType;
/// Computes a Bresenham line in a 3D image slice. /// Computes a Bresenham line in a 3D image slice.
IMAGEFILTEROP_API static PathType draw(const ::fwDataTools::helper::MedicalImage::Orientation orientation, FILTER_IMAGE_API static PathType draw(const data::tools::helper::MedicalImage::Orientation orientation,
const CoordinatesType& startCoord, const CoordinatesType& endCoord); const CoordinatesType& startCoord, const CoordinatesType& endCoord);
}; };
......
...@@ -20,18 +20,18 @@ ...@@ -20,18 +20,18 @@
* *
***********************************************************************/ ***********************************************************************/
#include "imageFilterOp/Flipper.hpp" #include "filter/image/Flipper.hpp"
#include <core/tools/Dispatcher.hpp> #include <core/tools/Dispatcher.hpp>
#include <core/tools/TypeKeyTypeMapping.hpp> #include <core/tools/TypeKeyTypeMapping.hpp>
#include <data/tools/fieldHelper/MedicalImageHelpers.hpp> #include <data/tools/fieldHelper/MedicalImageHelpers.hpp>
#include <fwItkIO/itk.hpp> #include <io/itk/itk.hpp>
#include <itkFlipImageFilter.h> #include <itkFlipImageFilter.h>
namespace imageFilterOp namespace sight::filter::image
{ {
struct Parameters struct Parameters
...@@ -51,7 +51,7 @@ struct Flipping ...@@ -51,7 +51,7 @@ struct Flipping
void operator()(Parameters& params) void operator()(Parameters& params)
{ {
typedef typename ::itk::Image< PixelType, dimension> ImageType; typedef typename ::itk::Image< PixelType, dimension> ImageType;
const typename ImageType::Pointer itkImage = ::fwItkIO::itkImageFactory< ImageType >(params.i_image); const typename ImageType::Pointer itkImage = io::itk::itkImageFactory< ImageType >(params.i_image);
typename ::itk::FlipImageFilter<ImageType>::Pointer flipFilter = typename ::itk::FlipImageFilter<ImageType>::Pointer flipFilter =
::itk::FlipImageFilter<ImageType>::New(); ::itk::FlipImageFilter<ImageType>::New();
...@@ -67,7 +67,7 @@ struct Flipping ...@@ -67,7 +67,7 @@ struct Flipping
flipFilter->Update(); flipFilter->Update();
typename ImageType::Pointer outputImage = flipFilter->GetOutput(); typename ImageType::Pointer outputImage = flipFilter->GetOutput();
::fwItkIO::itkImageToFwDataImage(outputImage, params.o_image); io::itk::itkImageToFwDataImage(outputImage, params.o_image);
} }
}; };
...@@ -129,4 +129,4 @@ void Flipper::flip(const data::Image::csptr& _inImage, ...@@ -129,4 +129,4 @@ void Flipper::flip(const data::Image::csptr& _inImage,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
}// namespace imageFilterOp }// namespace sight::filter::image
...@@ -22,17 +22,17 @@ ...@@ -22,17 +22,17 @@
#pragma once #pragma once
#include "imageFilterOp/config.hpp" #include "filter/image/config.hpp"
#include <data/Image.hpp> #include <data/Image.hpp>
#include <data/TransformationMatrix3D.hpp> #include <data/TransformationMatrix3D.hpp>
namespace imageFilterOp namespace sight::filter::image
{ {
/** /**
* @brief The Flipper class * @brief The Flipper class
*/ */
class IMAGEFILTEROP_CLASS_API Flipper class FILTER_IMAGE_CLASS_API Flipper
{ {
public: public:
...@@ -43,10 +43,10 @@ public: ...@@ -43,10 +43,10 @@ public:
* @param _outImage flipped image. * @param _outImage flipped image.
* @param _flipAxis axes on which to flip the image. * @param _flipAxis axes on which to flip the image.
*/ */
static IMAGEFILTEROP_API void flip(const data::Image::csptr& _inImage, static FILTER_IMAGE_API void flip(const data::Image::csptr& _inImage,
const data::Image::sptr& _outImage, const data::Image::sptr& _outImage,
const std::array<bool, 3>& _flipAxis); const std::array<bool, 3>& _flipAxis);
}; };
}// namespace imageFilterOp }// namespace sight::filter::image
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
* *
***********************************************************************/ ***********************************************************************/
#include "data/tools/Image.hpp" #include "Image.hpp"
#include <core/tools/Combinatory.hpp> #include <core/tools/Combinatory.hpp>
#include <core/tools/Dispatcher.hpp> #include <core/tools/Dispatcher.hpp>
#include <core/tools/TypeKeyTypeMapping.hpp> #include <core/tools/TypeKeyTypeMapping.hpp>
namespace sight::data::tools namespace sight::filter::image
{ {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -88,7 +88,7 @@ struct RoiApplyerCaller ...@@ -88,7 +88,7 @@ struct RoiApplyerCaller
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Image::applyRoi( data::Image::sptr image, data::Image::sptr roi ) void applyRoi( data::Image::sptr image, data::Image::sptr roi )
{ {
SLM_ASSERT( "Null image pointers", image && roi); SLM_ASSERT( "Null image pointers", image && roi);
SLM_ASSERT( "Images have different size", image->getSize2() == roi->getSize2()); SLM_ASSERT( "Images have different size", image->getSize2() == roi->getSize2());
...@@ -167,7 +167,7 @@ struct RoiTesterCaller ...@@ -167,7 +167,7 @@ struct RoiTesterCaller
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Image::isRoiApplyed( data::Image::sptr image, data::Image::sptr roi, data::Image::sptr imgRoiApplyed ) bool isRoiApplyed( data::Image::sptr image, data::Image::sptr roi, data::Image::sptr imgRoiApplyed )
{ {
SLM_ASSERT( "Null image pointers", image && imgRoiApplyed && roi); SLM_ASSERT( "Null image pointers", image && imgRoiApplyed && roi);
SLM_ASSERT( "Images have different size", SLM_ASSERT( "Images have different size",
...@@ -187,4 +187,4 @@ bool Image::isRoiApplyed( data::Image::sptr image, data::Image::sptr roi, data:: ...@@ -187,4 +187,4 @@ bool Image::isRoiApplyed( data::Image::sptr image, data::Image::sptr roi, data::
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
} // namespace sight::data::tools } // namespace sight::filter::image
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#pragma once #pragma once
#include "data/config.hpp" #include "filter/image/config.hpp"
#include <core/base.hpp> #include <core/base.hpp>
#include <core/tools/Type.hpp> #include <core/tools/Type.hpp>
...@@ -31,45 +31,30 @@ ...@@ -31,45 +31,30 @@
#include <geometry/data/Compare.hpp> #include <geometry/data/Compare.hpp>
namespace sight::data::tools // Contains helper to generate and compare images.
namespace sight::filter::image
{ {
/** /**
* @brief This class contains helper to generate and compare images. * @brief Apply roi to image
*
* set input image voxel to zero where roi voxel value is zero
*/ */
class Image FILTER_IMAGE_API static void applyRoi( data::Image::sptr image, data::Image::sptr roi );
{
public:
/**
* @brief Apply roi to image
*
* set input image voxel to zero where roi voxel value is zero
*/
DATA_API static void applyRoi( data::Image::sptr image,
data::Image::sptr roi );
/**
* @brief Check if 'imgRoiApplyed' is the result of 'roi' applyed to 'image'
*
*/
DATA_API static bool isRoiApplyed( data::Image::sptr image,
data::Image::sptr imgRoiApplyed,
data::Image::sptr roi );
/**
* @brief Merge mask in image imgDest: put value 'val' in imgDest when mask value != 0
*/
template<typename IMG_DEST_TYPE, typename MASK_TYPE>
void mergeMask(const data::Image::sptr& imgDest, const data::Image::csptr& mask, IMG_DEST_TYPE val );
}; /**
* @brief Check if 'imgRoiApplyed' is the result of 'roi' applyed to 'image'
//------------------------------------------------------------------------------ *
*/
FILTER_IMAGE_API static bool isRoiApplyed( data::Image::sptr image,
data::Image::sptr imgRoiApplyed,
data::Image::sptr roi );
/**
* @brief Merge mask in image imgDest: put value 'val' in imgDest when mask value != 0
*/
template<typename IMG_DEST_TYPE, typename MASK_TYPE> template<typename IMG_DEST_TYPE, typename MASK_TYPE>
void Image::mergeMask(const data::Image::sptr& imgDest, const data::Image::csptr& mask, IMG_DEST_TYPE val ) void mergeMask(const data::Image::sptr& imgDest, const data::Image::csptr& mask, IMG_DEST_TYPE val )
{ {
typedef IMG_DEST_TYPE ImgDestType; typedef IMG_DEST_TYPE ImgDestType;
typedef MASK_TYPE MaskType; typedef MASK_TYPE MaskType;
...@@ -100,4 +85,4 @@ void Image::mergeMask(const data::Image::sptr& imgDest, const data::Image::csptr ...@@ -100,4 +85,4 @@ void Image::mergeMask(const data::Image::sptr& imgDest, const data::Image::csptr
} }
} }
} // namespace sight::data::tools } // namespace sight::filter::image
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
* *
***********************************************************************/ ***********************************************************************/
#include "data/tools/ImageDiff.hpp" #include "ImageDiff.hpp"
namespace sight::data::tools namespace sight::filter::image
{ {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -248,4 +248,4 @@ void ImageDiff::revertDiffElt(const data::Image::sptr& img, size_t eltIndex) con ...@@ -248,4 +248,4 @@ void ImageDiff::revertDiffElt(const data::Image::sptr& img, size_t eltIndex) con
img->setPixelBuffer(index, oldValue); img->setPixelBuffer(index, oldValue);
} }
} // namespace sight::data::tools } // namespace sight::filter::image
...@@ -22,17 +22,17 @@ ...@@ -22,17 +22,17 @@
#pragma once #pragma once
#include "data/config.hpp" #include "filter/image/config.hpp"
#include <data/Image.hpp> #include <data/Image.hpp>
namespace sight::data::tools namespace sight::filter::image
{ {
/** /**
* @brief Class memorizing pixel changes in an image. * @brief Class memorizing pixel changes in an image.
*/ */
class DATA_CLASS_API ImageDiff class FILTER_IMAGE_CLASS_API ImageDiff
{ {
public: public:
...@@ -44,50 +44,50 @@ public: ...@@ -44,50 +44,50 @@ public:
}; };
/// Constructor. /// Constructor.
DATA_API ImageDiff(const size_t imageElementSize = 0, const size_t reservedElements = 0); FILTER_IMAGE_API ImageDiff(const size_t imageElementSize = 0, const size_t reservedElements = 0);
/// Destructor /// Destructor
DATA_API ~ImageDiff(); FILTER_IMAGE_API ~ImageDiff();
/// Copy constructor /// Copy constructor
DATA_API ImageDiff(const ImageDiff& other); FILTER_IMAGE_API ImageDiff(const ImageDiff& other);
/// Move constructor /// Move constructor
DATA_API ImageDiff(ImageDiff&& other); FILTER_IMAGE_API ImageDiff(ImageDiff&& other);
/// Copy assignement. /// Copy assignement.
DATA_API ImageDiff& operator= (const ImageDiff& other); FILTER_IMAGE_API ImageDiff& operator= (const ImageDiff& other);
/// Move assignement. /// Move assignement.
DATA_API ImageDiff& operator= (ImageDiff&& other); FILTER_IMAGE_API ImageDiff& operator= (ImageDiff&& other);
/// Concatenate two diffs. /// Concatenate two diffs.
DATA_API void addDiff(const ImageDiff& diff); FILTER_IMAGE_API void addDiff(const ImageDiff& diff);
/// Append a new pixel diff. /// Append a new pixel diff.
DATA_API void addDiff(const data::Image::IndexType index, const data::Image::BufferType* oldValue, FILTER_IMAGE_API void addDiff(const data::Image::IndexType index, const data::Image::BufferType* oldValue,
const data::Image::BufferType* newValue); const data::Image::BufferType* newValue);
/// Write the new values in the image. /// Write the new values in the image.
DATA_API void applyDiff(const data::Image::sptr& img) const; FILTER_IMAGE_API void applyDiff(const data::Image::sptr& img) const;
/// Write the old value back in the image. /// Write the old value back in the image.
DATA_API void revertDiff(const data::Image::sptr& img) const; FILTER_IMAGE_API void revertDiff(const data::Image::sptr& img) const;
/// Return the amount of memory actually used by the elements. /// Return the amount of memory actually used by the elements.
DATA_API size_t getSize() const; FILTER_IMAGE_API size_t getSize() const;
/// Returns the number of stored pixel diffs. /// Returns the number of stored pixel diffs.
DATA_API size_t getNumberOfElements() const; FILTER_IMAGE_API size_t getNumberOfElements() const;
/// Set the number of elements to 0. /// Set the number of elements to 0.
DATA_API void clear(); FILTER_IMAGE_API void clear();
/// Reallocate the buffer to fit the actual size of the container. /// Reallocate the buffer to fit the actual size of the container.
DATA_API void shrink(); FILTER_IMAGE_API void shrink();
/// Returns the element at the given index /// Returns the element at the given index
DATA_API ElementType getElement(size_t index) const; FILTER_IMAGE_API ElementType getElement(size_t index) const;
/// Returns the image index from the element at the given index /// Returns the image index from the element at the given index
inline data::Image::IndexType getElementDiffIndex(size_t eltIndex) const; inline data::Image::IndexType getElementDiffIndex(size_t eltIndex) const;
...@@ -124,4 +124,4 @@ data::Image::IndexType ImageDiff::getElementDiffIndex(size_t eltIndex) const ...@@ -124,4 +124,4 @@ data::Image::IndexType ImageDiff::getElementDiffIndex(size_t eltIndex) const
return *reinterpret_cast< data::Image::IndexType* >(eltPtr); return *reinterpret_cast< data::Image::IndexType* >(eltPtr);
} }
} // namespace sight::data::tools } // namespace sight::filter::image
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* *
***********************************************************************/ ***********************************************************************/
#include "imageFilterOp/ImageExtruder.hpp" #include "filter/image/ImageExtruder.hpp"
#include <core/tools/Dispatcher.hpp> #include <core/tools/Dispatcher.hpp>
#include <core/tools/TypeKeyTypeMapping.hpp> #include <core/tools/TypeKeyTypeMapping.hpp>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <glm/gtx/intersect.hpp> #include <glm/gtx/intersect.hpp>
#include <glm/vec2.hpp> #include <glm/vec2.hpp>
namespace imageFilterOp namespace sight::filter::image
{ {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......