From: ctorres Date: Wed, 20 Nov 2013 14:27:10 +0000 (+0100) Subject: New functionality, transforms a vtk image 4D into a itk image 4D. X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b29724c42f07b25ec62e96ff9bf4a7d82a69afe8;p=creaVtk.git New functionality, transforms a vtk image 4D into a itk image 4D. --- diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx new file mode 100644 index 0000000..fb20c30 --- /dev/null +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx @@ -0,0 +1,57 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#include "bbcreaVtkFromVtk4DToItk4D.h" +#include "bbcreaVtkPackage.h" +#include "creaVtkFromVtk4DToItk4D.h" +#include "vtkImageData.h" +#include "itkImage.h" +namespace bbcreaVtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,FromVtk4DToItk4D) +BBTK_BLACK_BOX_IMPLEMENTATION(FromVtk4DToItk4D,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::Process() +{ + creaVtkFromVtk4DToItk4D prs; + prs.SetImage4Dvtk(bbGetInputIn()); + bbSetOutputOut(prs.Process()); +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::bbUserSetDefaultValues() +{ +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaVtk + + diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ new file mode 100644 index 0000000..c85c4eb --- /dev/null +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ @@ -0,0 +1,62 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#include "bbcreaVtkFromVtk4DToItk4D.h" +#include "bbcreaVtkPackage.h" +#include "creaVtkFromVtk4DToItk4D.h" +#include "vtkImageData.h" +#include "itkImage.h" +namespace bbcreaVtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,FromVtk4DToItk4D) +BBTK_BLACK_BOX_IMPLEMENTATION(FromVtk4DToItk4D,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::Process() +{ + creaVtkFromVtk4DToItk4D prs; + prs.SetImage4Dvtk(bbGetInputIn()); + bbSetOutputOut(prs.Process()); +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputIn(0); + +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + +} +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void FromVtk4DToItk4D::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaVtk + + diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h new file mode 100644 index 0000000..5ea20bb --- /dev/null +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h @@ -0,0 +1,48 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#ifndef __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ +#define __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ +#include "bbcreaVtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" +#include "vtkImageData.h" +#include +#include "itkImage.h" + +namespace bbcreaVtk +{ + +class bbcreaVtk_EXPORT FromVtk4DToItk4D + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(FromVtk4DToItk4D,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== + BBTK_DECLARE_INPUT(In,std::vector ); + BBTK_DECLARE_OUTPUT(Out,std::vector >); + BBTK_PROCESS(Process); + void Process(); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(FromVtk4DToItk4D,bbtk::AtomicBlackBox); +BBTK_NAME("FromVtk4DToItk4D"); +BBTK_AUTHOR("Carlos Torres"); +BBTK_DESCRIPTION("carlos.torres@creatis.insa-lyon.fr -"); +BBTK_CATEGORY("empty"); +BBTK_INPUT(FromVtk4DToItk4D,In,"Vtk image 4D",std::vector,""); +BBTK_OUTPUT(FromVtk4DToItk4D,Out,"Itk image 4D",std::vector >,""); +BBTK_END_DESCRIBE_BLACK_BOX(FromVtk4DToItk4D); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +} +// EO namespace bbcreaVtk + +#endif // __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ + diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h~ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h~ new file mode 100644 index 0000000..399a007 --- /dev/null +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h~ @@ -0,0 +1,45 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#ifndef __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ +#define __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ +#include "bbcreaVtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +namespace bbcreaVtk +{ + +class bbcreaVtk_EXPORT FromVtk4DToItk4D + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(FromVtk4DToItk4D,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== + BBTK_DECLARE_INPUT(In,std::vector ); + BBTK_DECLARE_OUTPUT(Out,std::vector >); + BBTK_PROCESS(Process); + void Process(); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(FromVtk4DToItk4D,bbtk::AtomicBlackBox); +BBTK_NAME("FromVtk4DToItk4D"); +BBTK_AUTHOR("Carlos Torres"); +BBTK_DESCRIPTION("carlos.torres@creatis.insa-lyon.fr -"); +BBTK_CATEGORY("empty"); +BBTK_INPUT(FromVtk4DToItk4D,In,"Vtk image 4D",std::vector,""); +BBTK_OUTPUT(FromVtk4DToItk4D,Out,"Itk image 4D",std::vector >,""); +BBTK_END_DESCRIBE_BLACK_BOX(FromVtk4DToItk4D); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +} +// EO namespace bbcreaVtk + +#endif // __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ + diff --git a/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp b/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp new file mode 100644 index 0000000..a54c7d1 --- /dev/null +++ b/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp @@ -0,0 +1,181 @@ +/* +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sante) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ +*/ + +#include "creaVtkFromVtk4DToItk4D.h" +#include "itkImage.h" +#include "itkImageLinearConstIteratorWithIndex.h" +#include "itkImageRegionConstIterator.h" +#include "itkImageRegionIterator.h" +#include "itkImageFileReader.h" +#include + +template +creaVtkFromVtk4DToItk4D::creaVtkFromVtk4DToItk4D() +{ +} + +template +creaVtkFromVtk4DToItk4D::~creaVtkFromVtk4DToItk4D() +{ +} + +template +void creaVtkFromVtk4DToItk4D::SetImage4D(TImage *image) +{ + _image4D = image; +} + +template +void creaVtkFromVtk4DToItk4D::SetImage4Dvtk(std::vector image) +{ + image4Dvtk = image; +} + +template +std::vector > creaVtkFromVtk4DToItk4D::Process() +{ + /* + int dir; + double pv[65]; + int count = 0; + typedef itk::ImageLinearConstIteratorWithIndex< TImage > ConstIteratorType; + const unsigned int Dimension = 4; + typedef unsigned char PixelType; + typedef itk::Image< PixelType, Dimension > ImageType; + + ConstIteratorType inputIt( _image4D, inputRegion ); + inputIt.SetDirection(3); + inputIt.GoToBegin(); + + ImageType::RegionType outputRegion; + ImageType::RegionType::IndexType outputStart; + outputStart[0] = 0; + outputStart[1] = 0; + outputRegion.SetSize( size ); + outputRegion.SetIndex( outputStart ); + + while( !inputIt.IsAtEnd() ) + { + inputIt.GoToBeginOfLine(); + count = 0; + while( !inputIt.IsAtEndOfLine() ) + { + pv[count] = inputIt.Get(); + ++inputIt; + ++count; + } + } +*/ + const unsigned int Dimension = 4; + typedef unsigned char PixelType; + typedef itk::Image< PixelType, Dimension > ImageType; + typedef itk::ImageRegionConstIterator< ImageType > ConstIteratorType; + typedef itk::ImageRegionIterator< ImageType> IteratorType; + + //typedef itk::ImageFileReader< ImageType > ReaderType; + //typedef itk::ImageFileWriter< ImageType > WriterType; + + ImageType::RegionType inputRegion; + ImageType::RegionType::IndexType inputStart; + ImageType::RegionType::SizeType size; + inputStart[0] = ::atoi( "20" ); + inputStart[1] = ::atoi( "70" ); + size[0] = ::atoi( "210" ); + size[1] = ::atoi( "140" ); + inputRegion.SetSize( size ); + inputRegion.SetIndex( inputStart ); + + ImageType::RegionType outputRegion; + ImageType::RegionType::IndexType outputStart; + outputStart[0] = 0; + outputStart[1] = 0; + outputStart[2] = 0; + outputStart[3] = 0; + outputRegion.SetSize( size ); + outputRegion.SetIndex( outputStart ); + + /* + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName( "foo.vtk" ); + try + { + reader->Update(); + } + catch ( itk::ExceptionObject &err) + { + std::cerr << "ExceptionObject caught !" << std::endl; + std::cerr << err << std::endl; + return -1; + } + + if ( ! reader->GetOutput()->GetRequestedRegion().IsInside( inputRegion ) ) + { + std::cerr << "Error" << std::endl; + std::cerr << "The region " << inputRegion << "is not contained within the input image region " + << reader->GetOutput()->GetRequestedRegion() << std::endl; + return -1; + }*/ + std::vector outputImage4D; + for(int k = 0 ; k < image4Dvtk.size() ; k++){ + ImageType::Pointer outputImage = ImageType::New(); + outputImage->SetRegions( outputRegion ); + const ImageType::SpacingType& spacing = image4Dvtk[k]->GetSpacing(); + const ImageType::PointType& inputOrigin = image4Dvtk[k]->GetOrigin(); + double outputOrigin[ Dimension ]; + for(unsigned int i=0; i< Dimension; i++) + { + outputOrigin[i] = inputOrigin[i] + spacing[i] * inputStart[i]; + } + outputImage->SetSpacing( spacing ); + outputImage->SetOrigin( outputOrigin ); + outputImage->Allocate(); + + ConstIteratorType inputIt( image4Dvtk[k], inputRegion ); + IteratorType outputIt( outputImage, outputRegion ); + inputIt.GoToBegin(); + outputIt.GoToBegin(); + + while( !outputIt.IsAtEnd() ) + { + outputIt.Set( inputIt.Get() ); + ++inputIt; + ++outputIt; + } + outputImage4D[k]=outputImage; + } + return outputImage4D; +} +//--------------------------------------------- +//Method template +//--------------------------------------------- +/* +void creaVtkFromVtk4DToItk4D::FunctionName(int& parameterA) +{ + parameterA = 2 * parameterA; + return; +} +*/ diff --git a/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp~ b/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp~ new file mode 100644 index 0000000..a54c7d1 --- /dev/null +++ b/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp~ @@ -0,0 +1,181 @@ +/* +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sante) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ +*/ + +#include "creaVtkFromVtk4DToItk4D.h" +#include "itkImage.h" +#include "itkImageLinearConstIteratorWithIndex.h" +#include "itkImageRegionConstIterator.h" +#include "itkImageRegionIterator.h" +#include "itkImageFileReader.h" +#include + +template +creaVtkFromVtk4DToItk4D::creaVtkFromVtk4DToItk4D() +{ +} + +template +creaVtkFromVtk4DToItk4D::~creaVtkFromVtk4DToItk4D() +{ +} + +template +void creaVtkFromVtk4DToItk4D::SetImage4D(TImage *image) +{ + _image4D = image; +} + +template +void creaVtkFromVtk4DToItk4D::SetImage4Dvtk(std::vector image) +{ + image4Dvtk = image; +} + +template +std::vector > creaVtkFromVtk4DToItk4D::Process() +{ + /* + int dir; + double pv[65]; + int count = 0; + typedef itk::ImageLinearConstIteratorWithIndex< TImage > ConstIteratorType; + const unsigned int Dimension = 4; + typedef unsigned char PixelType; + typedef itk::Image< PixelType, Dimension > ImageType; + + ConstIteratorType inputIt( _image4D, inputRegion ); + inputIt.SetDirection(3); + inputIt.GoToBegin(); + + ImageType::RegionType outputRegion; + ImageType::RegionType::IndexType outputStart; + outputStart[0] = 0; + outputStart[1] = 0; + outputRegion.SetSize( size ); + outputRegion.SetIndex( outputStart ); + + while( !inputIt.IsAtEnd() ) + { + inputIt.GoToBeginOfLine(); + count = 0; + while( !inputIt.IsAtEndOfLine() ) + { + pv[count] = inputIt.Get(); + ++inputIt; + ++count; + } + } +*/ + const unsigned int Dimension = 4; + typedef unsigned char PixelType; + typedef itk::Image< PixelType, Dimension > ImageType; + typedef itk::ImageRegionConstIterator< ImageType > ConstIteratorType; + typedef itk::ImageRegionIterator< ImageType> IteratorType; + + //typedef itk::ImageFileReader< ImageType > ReaderType; + //typedef itk::ImageFileWriter< ImageType > WriterType; + + ImageType::RegionType inputRegion; + ImageType::RegionType::IndexType inputStart; + ImageType::RegionType::SizeType size; + inputStart[0] = ::atoi( "20" ); + inputStart[1] = ::atoi( "70" ); + size[0] = ::atoi( "210" ); + size[1] = ::atoi( "140" ); + inputRegion.SetSize( size ); + inputRegion.SetIndex( inputStart ); + + ImageType::RegionType outputRegion; + ImageType::RegionType::IndexType outputStart; + outputStart[0] = 0; + outputStart[1] = 0; + outputStart[2] = 0; + outputStart[3] = 0; + outputRegion.SetSize( size ); + outputRegion.SetIndex( outputStart ); + + /* + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName( "foo.vtk" ); + try + { + reader->Update(); + } + catch ( itk::ExceptionObject &err) + { + std::cerr << "ExceptionObject caught !" << std::endl; + std::cerr << err << std::endl; + return -1; + } + + if ( ! reader->GetOutput()->GetRequestedRegion().IsInside( inputRegion ) ) + { + std::cerr << "Error" << std::endl; + std::cerr << "The region " << inputRegion << "is not contained within the input image region " + << reader->GetOutput()->GetRequestedRegion() << std::endl; + return -1; + }*/ + std::vector outputImage4D; + for(int k = 0 ; k < image4Dvtk.size() ; k++){ + ImageType::Pointer outputImage = ImageType::New(); + outputImage->SetRegions( outputRegion ); + const ImageType::SpacingType& spacing = image4Dvtk[k]->GetSpacing(); + const ImageType::PointType& inputOrigin = image4Dvtk[k]->GetOrigin(); + double outputOrigin[ Dimension ]; + for(unsigned int i=0; i< Dimension; i++) + { + outputOrigin[i] = inputOrigin[i] + spacing[i] * inputStart[i]; + } + outputImage->SetSpacing( spacing ); + outputImage->SetOrigin( outputOrigin ); + outputImage->Allocate(); + + ConstIteratorType inputIt( image4Dvtk[k], inputRegion ); + IteratorType outputIt( outputImage, outputRegion ); + inputIt.GoToBegin(); + outputIt.GoToBegin(); + + while( !outputIt.IsAtEnd() ) + { + outputIt.Set( inputIt.Get() ); + ++inputIt; + ++outputIt; + } + outputImage4D[k]=outputImage; + } + return outputImage4D; +} +//--------------------------------------------- +//Method template +//--------------------------------------------- +/* +void creaVtkFromVtk4DToItk4D::FunctionName(int& parameterA) +{ + parameterA = 2 * parameterA; + return; +} +*/ diff --git a/lib/creaVtk/creaVtkFromVtk4DToItk4D.h b/lib/creaVtk/creaVtkFromVtk4DToItk4D.h new file mode 100644 index 0000000..3518f47 --- /dev/null +++ b/lib/creaVtk/creaVtkFromVtk4DToItk4D.h @@ -0,0 +1,51 @@ +/* +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sante) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ +*/ + +#ifndef _CREAVTKFROMVTK4DTOITK4D_H_ +#define _CREAVTKFROMVTK4DTOITK4D_H_ +#include "vtkImageData.h" +#include +#include "itkImage.h" +template +class creaVtkFromVtk4DToItk4D +{ +public : + creaVtkFromVtk4DToItk4D(); + ~creaVtkFromVtk4DToItk4D(); + void SetImage4D(TImage *image); + void SetImage4Dvtk(std::vector image); + std::vector > Process(); + +protected: + +private: + TImage* _image4D; + std::vector image4Dvtk; +}; + +//-end of _CREAVTKFROMVTK4DTOITK4D_H_------------------------------------------------------ +#endif diff --git a/lib/creaVtk/creaVtkFromVtk4DToItk4D.h~ b/lib/creaVtk/creaVtkFromVtk4DToItk4D.h~ new file mode 100644 index 0000000..fa0a29f --- /dev/null +++ b/lib/creaVtk/creaVtkFromVtk4DToItk4D.h~ @@ -0,0 +1,51 @@ +/* +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sante) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ +*/ + +#ifndef _CREAVTKFROMVTK4DTOITK4D_H_ +#define _CREAVTKFROMVTK4DTOITK4D_H_ +#include "vtkImageData.h" +#include +#include "itkImage.h" +template +class creaVtkFromVtk4DToItk4D +{ +public : + creaVtkFromVtk4DToItk4D(); + ~creaVtkFromVtk4DToItk4D(); + void SetImage4D(TImage *image); + void SetImage4Dvtk(std::vector image); + //std::vector > Process(); + +protected: + +private: + TImage* _image4D; + std::vector image4Dvtk; +}; + +//-end of _CREAVTKFROMVTK4DTOITK4D_H_------------------------------------------------------ +#endif