Commit ac6ed6a3 authored by Julien Waechter's avatar Julien Waechter
Browse files

Renamed namespace itkIO to fwItkIO

--HG--
branch : fw4spl_0.9.2
rename : SrcLib/io/fwItkIO/include/itkIO/ImageIOFactoryRegistrar.hxx => SrcLib/io/fwItkIO/include/fwItkIO/ImageIOFactoryRegistrar.hxx
rename : SrcLib/io/fwItkIO/include/itkIO/ImageReader.hpp => SrcLib/io/fwItkIO/include/fwItkIO/ImageReader.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/ImageWriter.hpp => SrcLib/io/fwItkIO/include/fwItkIO/ImageWriter.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/JpgImageWriter.hpp => SrcLib/io/fwItkIO/include/fwItkIO/JpgImageWriter.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/config.hpp => SrcLib/io/fwItkIO/include/fwItkIO/config.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/helper/ProgressItkToFw.hpp => SrcLib/io/fwItkIO/include/fwItkIO/helper/ProgressItkToFw.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/helper/ProgressItkToFw.hxx => SrcLib/io/fwItkIO/include/fwItkIO/helper/ProgressItkToFw.hxx
rename : SrcLib/io/fwItkIO/include/itkIO/itk.hpp => SrcLib/io/fwItkIO/include/fwItkIO/itk.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/itk.hxx => SrcLib/io/fwItkIO/include/fwItkIO/itk.hxx
rename : SrcLib/io/fwItkIO/include/itkIO/itkpp.hpp => SrcLib/io/fwItkIO/include/fwItkIO/itkpp.hpp
rename : SrcLib/io/fwItkIO/include/itkIO/itkpp.hxx => SrcLib/io/fwItkIO/include/fwItkIO/itkpp.hxx
rename : SrcLib/io/fwItkIO/src/itkIO/ImageReader.cpp => SrcLib/io/fwItkIO/src/fwItkIO/ImageReader.cpp
rename : SrcLib/io/fwItkIO/src/itkIO/ImageWriter.cpp => SrcLib/io/fwItkIO/src/fwItkIO/ImageWriter.cpp
rename : SrcLib/io/fwItkIO/src/itkIO/JpgImageWriter.cpp => SrcLib/io/fwItkIO/src/fwItkIO/JpgImageWriter.cpp
parent e65d9c8e
......@@ -23,7 +23,7 @@
#include <fwGui/dialog/ProgressDialog.hpp>
#include <fwGui/dialog/LocationDialog.hpp>
#include <itkIO/ImageReader.hpp>
#include <fwItkIO/ImageReader.hpp>
#include "ioITK/InrImageReaderService.hpp"
......@@ -91,7 +91,7 @@ void InrImageReaderService::info(std::ostream &_sstream )
bool InrImageReaderService::createImage( const ::boost::filesystem::path inrFileDir, ::fwData::Image::sptr _pImg )
{
SLM_TRACE_FUNC();
::itkIO::ImageReader::sptr myLoader = ::itkIO::ImageReader::New();
::fwItkIO::ImageReader::sptr myLoader = ::fwItkIO::ImageReader::New();
bool ok = true;
myLoader->setObject(_pImg);
......
......@@ -24,7 +24,7 @@
#include <fwGui/dialog/ProgressDialog.hpp>
#include <fwGui/dialog/LocationDialog.hpp>
#include <itkIO/ImageWriter.hpp>
#include <fwItkIO/ImageWriter.hpp>
#include "ioITK/InrImageWriterService.hpp"
......@@ -104,7 +104,7 @@ void InrImageWriterService::info(std::ostream &_sstream )
void InrImageWriterService::saveImage( const ::boost::filesystem::path inrFile, ::fwData::Image::sptr _pImage )
{
SLM_TRACE_FUNC();
::itkIO::ImageWriter::sptr myWriter = ::itkIO::ImageWriter::New();
::fwItkIO::ImageWriter::sptr myWriter = ::fwItkIO::ImageWriter::New();
myWriter->setObject(_pImage);
myWriter->setFile(inrFile);
......
......@@ -21,7 +21,7 @@
#include <fwGui/dialog/ProgressDialog.hpp>
#include <fwGui/dialog/LocationDialog.hpp>
#include <itkIO/JpgImageWriter.hpp>
#include <fwItkIO/JpgImageWriter.hpp>
#include "ioITK/JpgImageWriterService.hpp"
......@@ -101,7 +101,7 @@ void JpgImageWriterService::info(std::ostream &_sstream )
void JpgImageWriterService::saveImage(const ::boost::filesystem::path& imgPath, const SPTR(::fwData::Image)& img)
{
SLM_TRACE_FUNC();
::itkIO::JpgImageWriter::sptr writer = ::itkIO::JpgImageWriter::New();
::fwItkIO::JpgImageWriter::sptr writer = ::fwItkIO::JpgImageWriter::New();
::fwGui::dialog::ProgressDialog progressMeterGUI("Saving image... ");
::fwData::location::Folder::sptr loc = ::fwData::location::Folder::New();
......
......@@ -9,7 +9,7 @@
#include <itkSubtractImageFilter.h>
#include <itkIO/itk.hpp>
#include <fwItkIO/itk.hpp>
#include <fwCore/spyLog.hpp>
......@@ -110,10 +110,10 @@ void SImagesSubstract::updating() throw ( ::fwTools::Failed )
{
typedef itk::Image< ::boost::int16_t, 3 > ImageType;
ImageType::Pointer itkImage1 = ::itkIO::itkImageFactory< ImageType >( image1 ) ;
ImageType::Pointer itkImage1 = ::fwItkIO::itkImageFactory< ImageType >( image1 ) ;
SLM_ASSERT("Unable to convert fwData::Image to itkImage", itkImage1);
ImageType::Pointer itkImage2 = ::itkIO::itkImageFactory< ImageType >( image2 ) ;
ImageType::Pointer itkImage2 = ::fwItkIO::itkImageFactory< ImageType >( image2 ) ;
SLM_ASSERT("Unable to convert fwData::Image to itkImage", itkImage2);
ImageType::Pointer output;
......@@ -129,7 +129,7 @@ void SImagesSubstract::updating() throw ( ::fwTools::Failed )
filter->Update();
output = filter->GetOutput();
assert(output->GetSource());
::itkIO::dataImageFactory< ImageType >( output, imageResult, true );
::fwItkIO::dataImageFactory< ImageType >( output, imageResult, true );
::fwComEd::helper::Composite compositeHelper(compositeVisu);
if ( compositeVisu->find(imageResultName) != compositeVisu->end() )
......
......@@ -8,14 +8,14 @@
/**
* @file itkIO/ImageIOFactoryRegistrar.hpp
* @file fwItkIO/ImageIOFactoryRegistrar.hpp
* @brief The purpose of this class is to automatically register a Concrete ImageIOFactory in the factory database of ITK ( itk::ObjectFactoryBase ).
* @tparam the type of imageiofactory class to register
* The technique used is declare a global variable as instance of a class ( see REGISTER_IMAGEIOFACTORY ). The creation of the instance will call the
* registration of the factory
*/
namespace itkIO
namespace fwItkIO
{
template< class ConcreteImageIOFactory >
......@@ -34,4 +34,4 @@ public:
* @brief a macro helper to register an imageIOFactory
* @note to be declared outside any namespace
*/
#define REGISTER_IMAGEIOFACTORY( ConcreteImageIOFactory ) static ::itkIO::ImageIOFactoryRegistrar< ConcreteImageIOFactory > registrar;
#define REGISTER_IMAGEIOFACTORY( ConcreteImageIOFactory ) static ::fwItkIO::ImageIOFactoryRegistrar< ConcreteImageIOFactory > registrar;
......@@ -15,9 +15,9 @@
#include <fwTools/ProgressAdviser.hpp>
#include "itkIO/config.hpp"
#include "fwItkIO/config.hpp"
namespace itkIO
namespace fwItkIO
{
class ImageReader : public ::fwDataIO::reader::GenericObjectReader< ::fwData::Image >,
......@@ -40,6 +40,6 @@ public :
FWITKIO_API void read();
};
} // namespace itkIO
} // namespace fwItkIO
#endif // _FWITKIO_IMAGEREADER_HPP_
......@@ -14,9 +14,9 @@
#include <fwTools/ProgressAdviser.hpp>
#include <fwData/Image.hpp>
#include "itkIO/config.hpp"
#include "fwItkIO/config.hpp"
namespace itkIO
namespace fwItkIO
{
class ImageWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwData::Image >,
......@@ -41,6 +41,6 @@ public :
FWITKIO_API std::string extension();
};
} // namespace itkIO
} // namespace fwItkIO
#endif // _FWITKIO_IMAGEWRITER_HPP_
......@@ -14,9 +14,9 @@
#include <fwTools/ProgressAdviser.hpp>
#include <fwData/Image.hpp>
#include "itkIO/config.hpp"
#include "fwItkIO/config.hpp"
namespace itkIO
namespace fwItkIO
{
class JpgImageWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwData::Image >,
......@@ -41,6 +41,6 @@ public :
FWITKIO_API std::string extension();
};
} // namespace itkIO
} // namespace fwItkIO
#endif // _FWITKIO_JPGIMAGEWRITER_HPP_
......@@ -12,7 +12,7 @@
#include <fwTools/ProgressAdviser.hpp>
namespace itkIO
namespace fwItkIO
{
//------------------------------------------------------------------------------
......@@ -63,6 +63,6 @@ class Progressor
}
#include "itkIO/helper/ProgressItkToFw.hxx"
#include "fwItkIO/helper/ProgressItkToFw.hxx"
#endif /* _ITKIO_PROGESSITKTOFW_HPP_ */
......@@ -14,7 +14,7 @@
#include <fwCore/base.hpp>
namespace itkIO
namespace fwItkIO
{
class LocalCommand : public itk::Command
......
......@@ -11,9 +11,9 @@
#include <fwData/Image.hpp>
#include "itkIO/config.hpp"
#include "fwItkIO/config.hpp"
namespace itkIO
namespace fwItkIO
{
/**
......@@ -54,6 +54,6 @@ typename ITKIMAGE::Pointer itkImageFactory( ::fwData::Image::sptr imageData, boo
}
#include "itkIO/itk.hxx"
#include "fwItkIO/itk.hxx"
#endif // _FWITKIO_ITK_HPP_
......@@ -14,7 +14,7 @@
#include <fwComEd/helper/Image.hpp>
#include <fwComEd/helper/Array.hpp>
namespace itkIO
namespace fwItkIO
{
template< class ITKIMAGE>
......@@ -68,7 +68,7 @@ template< class ITKIMAGE>
::fwData::Image::sptr dataImageFactory( typename ITKIMAGE::Pointer itkImage, bool bufferManagerIsDataImage )
{
::fwData::Image::sptr data = ::fwData::Image::New();
::itkIO::dataImageFactory< ITKIMAGE >(itkImage,data, bufferManagerIsDataImage) ;
::fwItkIO::dataImageFactory< ITKIMAGE >(itkImage,data, bufferManagerIsDataImage) ;
return data;
}
......
......@@ -16,9 +16,9 @@
#include <fwData/Image.hpp>
#include "itkIO/config.hpp"
#include "fwItkIO/config.hpp"
namespace itkIO
namespace fwItkIO
{
......@@ -32,6 +32,6 @@ typename ScannerType::Pointer itkppScannerFactory( ::fwData::Image::sptr imageD
}
#include "itkIO/itkpp.hxx"
#include "fwItkIO/itkpp.hxx"
#endif // _FWITKIO_ITKPP_HPP_
......@@ -10,9 +10,9 @@
#include <itkCastImageFilter.h>
#include "itkIO/itk.hpp"
#include "fwItkIO/itk.hpp"
namespace itkIO
namespace fwItkIO
{
template< class PIXELTYPE , int VDimension , class ScannerType >
......@@ -20,7 +20,7 @@ typename ScannerType::Pointer itkppScannerFactory( ::fwData::Image::sptr imageD
{
typedef itk::Image< PIXELTYPE , VDimension > ImageType;
typename ImageType::Pointer itkRoi = ::itkIO::itkImageFactory< ImageType >( imageData ) ;
typename ImageType::Pointer itkRoi = ::fwItkIO::itkImageFactory< ImageType >( imageData ) ;
typedef itk::Image< unsigned char , VDimension > ROIType;
typedef itk::CastImageFilter< ImageType , ROIType > CasterType;
typename CasterType::Pointer caster = CasterType::New() ;
......
......@@ -10,7 +10,7 @@
#include <fstream>
#include "itkImageIOBase.h"
#include "itkIO/config.hpp"
#include "fwItkIO/config.hpp"
namespace itk
{
......
......@@ -12,7 +12,7 @@
#include <fwCore/base.hpp>
#include <fwData/Image.hpp>
#include <itkIO/itk.hpp>
#include <fwItkIO/itk.hpp>
#include <fwTools/IntrinsicTypes.hpp>
......@@ -23,13 +23,13 @@
#include "inr2itk/itkInrImageIOFactory.h"
#include "itkIO/ImageReader.hpp"
#include "itkIO/helper/ProgressItkToFw.hpp"
#include "fwItkIO/ImageReader.hpp"
#include "fwItkIO/helper/ProgressItkToFw.hpp"
fwDataIOReaderRegisterMacro( ::itkIO::ImageReader );
fwDataIOReaderRegisterMacro( ::fwItkIO::ImageReader );
namespace itkIO
namespace fwItkIO
{
//------------------------------------------------------------------------------
......@@ -54,13 +54,13 @@ struct ITKLoaderFunctor
{
::fwData::Image::sptr m_dataImage;
std::string m_filename;
::itkIO::ImageReader::sptr m_fwReader;
::fwItkIO::ImageReader::sptr m_fwReader;
};
template<class PIXELTYPE>
void operator()(Parameter &param)
{
OSLM_INFO( "::itkIO::ImageReader::ITKLoaderFunctor with PIXELTYPE "<< ::fwTools::DynamicType::string<PIXELTYPE>() );
OSLM_INFO( "::fwItkIO::ImageReader::ITKLoaderFunctor with PIXELTYPE "<< ::fwTools::DynamicType::string<PIXELTYPE>() );
// VAG attention : ImageFileReader ne notifie AUCUNE progressEvent mais son ImageIO oui!!!! mais ImageFileReader ne permet pas de l'atteindre
// car soit mis a la mano ou alors construit lors de l'Update donc trop tard
......@@ -82,7 +82,7 @@ struct ITKLoaderFunctor
reader->Update();
typename ImageType::Pointer itkimage = reader->GetOutput();
::itkIO::dataImageFactory< ImageType>( itkimage, param.m_dataImage );
::fwItkIO::dataImageFactory< ImageType>( itkimage, param.m_dataImage );
}
//// get pixel type from Header
......@@ -130,4 +130,4 @@ void ImageReader::read()
//------------------------------------------------------------------------------
} // namespace itkIO
} // namespace fwItkIO
......@@ -12,7 +12,7 @@
#include <fwTools/DynamicTypeKeyTypeMapping.hpp>
#include <fwTools/Dispatcher.hpp>
#include <itkIO/itk.hpp>
#include <fwItkIO/itk.hpp>
#include <fwTools/IntrinsicTypes.hpp>
#include <fwTools/DynamicTypeKeyTypeMapping.hpp>
......@@ -21,14 +21,14 @@
#include <fwDataIO/writer/registry/macros.hpp>
#include "itkIO/helper/ProgressItkToFw.hpp"
#include "itkIO/ImageWriter.hpp"
#include "fwItkIO/helper/ProgressItkToFw.hpp"
#include "fwItkIO/ImageWriter.hpp"
fwDataIOWriterRegisterMacro( ::itkIO::ImageWriter );
fwDataIOWriterRegisterMacro( ::fwItkIO::ImageWriter );
namespace itkIO
namespace fwItkIO
{
//------------------------------------------------------------------------------
......@@ -53,7 +53,7 @@ struct ITKSaverFunctor
{
std::string m_filename;
::fwData::Image::sptr m_dataImage;
::itkIO::ImageWriter::sptr m_fwWriter;
::fwItkIO::ImageWriter::sptr m_fwWriter;
};
template<class PIXELTYPE>
......@@ -81,7 +81,7 @@ struct ITKSaverFunctor
Progressor progress(castHelper, param.m_fwWriter, param.m_filename);
// create itk Image
typename itkImageType::Pointer itkImage = ::itkIO::itkImageFactory<itkImageType>( param.m_dataImage );
typename itkImageType::Pointer itkImage = ::fwItkIO::itkImageFactory<itkImageType>( param.m_dataImage );
writer->SetFileName( param.m_filename.c_str() );
writer->SetInput( itkImage );
......@@ -124,4 +124,4 @@ void ImageWriter::write()
//------------------------------------------------------------------------------
} // namespace itkIO
} // namespace fwItkIO
......@@ -26,18 +26,18 @@
#include <fwData/Image.hpp>
#include <fwData/TransferFunction.hpp>
#include <itkIO/itk.hpp>
#include <fwItkIO/itk.hpp>
#include <fwDataIO/writer/registry/macros.hpp>
#include "itkIO/helper/ProgressItkToFw.hpp"
#include "itkIO/JpgImageWriter.hpp"
#include "fwItkIO/helper/ProgressItkToFw.hpp"
#include "fwItkIO/JpgImageWriter.hpp"
fwDataIOWriterRegisterMacro( ::itkIO::JpgImageWriter );
fwDataIOWriterRegisterMacro( ::fwItkIO::JpgImageWriter );
namespace itkIO
namespace fwItkIO
{
//------------------------------------------------------------------------------
......@@ -63,7 +63,7 @@ struct JpgITKSaverFunctor
{
std::string m_filename;
::fwData::Image::sptr m_dataImage;
::itkIO::JpgImageWriter::sptr m_fwWriter;
::fwItkIO::JpgImageWriter::sptr m_fwWriter;
};
template<class PIXELTYPE>
......@@ -93,7 +93,7 @@ struct JpgITKSaverFunctor
Progressor progress(castHelper, param.m_fwWriter, param.m_filename);
// create itk Image
typename itkImageType::Pointer itkImage = ::itkIO::itkImageFactory<itkImageType>( image );
typename itkImageType::Pointer itkImage = ::fwItkIO::itkImageFactory<itkImageType>( image );
typedef ::itk::IntensityWindowingImageFilter< itkImageType, itkImageType > RescaleFilterType;
typename RescaleFilterType::Pointer rescaleFilter = RescaleFilterType::New();
......@@ -170,4 +170,4 @@ std::string JpgImageWriter::extension()
return ".jpg";
}
} // namespace itkIO
} // namespace fwItkIO
......@@ -4,7 +4,7 @@
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#include "itkIO/ImageIOFactoryRegistrar.hxx"
#include "fwItkIO/ImageIOFactoryRegistrar.hxx"
#include "inr2itk/itkInrImageIOFactory.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment