X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.cxx;h=9a6fc8ff489f39c1d661b1a55940a46253d3a2c3;hb=3fc5b4681b8e77aaedb0ce85176686b7d8e6c68c;hp=1f5116849cb711a73cc80cfa19954c1bcfd7c6ab;hpb=c13d024475699d94ed1018a1e3be7cce91f1de97;p=clitk.git diff --git a/common/vvImage.cxx b/common/vvImage.cxx index 1f51168..9a6fc8f 100644 --- a/common/vvImage.cxx +++ b/common/vvImage.cxx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef VVIMAGE_CXX #define VVIMAGE_CXX @@ -26,7 +26,6 @@ // vtk #include -#include #include // std @@ -52,7 +51,6 @@ void vvImage::Init() //-------------------------------------------------------------------- vvImage::~vvImage() { - // DD("vvImage got deleted!"); Reset(); } //-------------------------------------------------------------------- @@ -60,10 +58,7 @@ vvImage::~vvImage() //-------------------------------------------------------------------- void vvImage::Reset() { - mVtkImages.resize(0); - mTransformedVtkImages.resize(0); - mVtkImageReslice.resize(0); - + mVtkImages.clear(); Init(); } //-------------------------------------------------------------------- @@ -199,13 +194,6 @@ const std::vector& vvImage::GetVTKImages() } //-------------------------------------------------------------------- -//-------------------------------------------------------------------- -const std::vector& vvImage::GetTransformedVTKImages() -{ - return mTransformedVtkImages; -} -//-------------------------------------------------------------------- - //-------------------------------------------------------------------- vtkImageData* vvImage::GetFirstVTKImageData() { @@ -239,7 +227,6 @@ bool vvImage::IsScalarTypeInteger(int t) return false; } } - //-------------------------------------------------------------------- //-------------------------------------------------------------------- @@ -249,13 +236,18 @@ vtkSmartPointer vvImage::GetTransform() } //-------------------------------------------------------------------- + //-------------------------------------------------------------------- -void vvImage::UpdateReslice() +bool vvImage::HaveSameSizeAndSpacingThan(vvImage * other) { - for (unsigned int i=0; iUpdate(); + bool same = true; + for(int i=0; iGetSize()[i]) same = false; + if ( GetSpacing()[i] != other->GetSpacing()[i]) same = false; } + return same; } //-------------------------------------------------------------------- + #endif // VVIMAGE_CXX