From a8769cd2a4eea19ed0b931a204319e4739f088a5 Mon Sep 17 00:00:00 2001 From: ctorres Date: Tue, 26 Nov 2013 15:53:07 +0100 Subject: [PATCH] xx --- .../src/bbcreaVtkFromVtk4DToItk4D.cxx~ | 57 ------ .../src/bbcreaVtkImage3DVector.cxx | 62 ------- .../src/bbcreaVtkImage3DVector.cxx~ | 62 ------- bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h | 50 ----- .../src/bbcreaVtkImage3DVector.h~ | 49 ----- lib/creaVtk/creaVtkHeartAngles.cpp~ | 173 ------------------ lib/creaVtk/creaVtkHeartAngles.h~ | 64 ------- lib/creaVtk/creaVtkIma3DVector.cpp | 110 ----------- lib/creaVtk/creaVtkIma3DVector.cpp~ | 47 ----- lib/creaVtk/creaVtkIma3DVector.h | 69 ------- lib/creaVtk/creaVtkIma3DVector.h~ | 64 ------- 11 files changed, 807 deletions(-) delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.cxx delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.cxx~ delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h~ delete mode 100644 lib/creaVtk/creaVtkHeartAngles.cpp~ delete mode 100644 lib/creaVtk/creaVtkHeartAngles.h~ delete mode 100644 lib/creaVtk/creaVtkIma3DVector.cpp delete mode 100644 lib/creaVtk/creaVtkIma3DVector.cpp~ delete mode 100644 lib/creaVtk/creaVtkIma3DVector.h delete mode 100644 lib/creaVtk/creaVtkIma3DVector.h~ diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ deleted file mode 100644 index f322be7..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx~ +++ /dev/null @@ -1,57 +0,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) -//===== -#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/bbcreaVtkImage3DVector.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.cxx deleted file mode 100644 index 1d8d2d4..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.cxx +++ /dev/null @@ -1,62 +0,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) -//===== -#include "bbcreaVtkImage3DVector.h" -#include "bbcreaVtkPackage.h" -#include "creaVtkIma3DVector.h" -#include "vtkImageData.h" - -namespace bbcreaVtk -{ - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Image3DVector) -BBTK_BLACK_BOX_IMPLEMENTATION(Image3DVector,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 Image3DVector::Process() -{ - - creaVtkIma3DVector cvtkc; - bbSetOutputOut( cvtkc.Ima3DVectorM ((unsigned int)bbGetInputNbImagesPerRow(), (unsigned int)bbGetInputNbImagesInMosaic(), bbGetInputIn() ) ); - -} -//===== -// 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 Image3DVector::bbUserSetDefaultValues() -{ - - bbSetInputNbImagesPerRow(0); - bbSetInputNbImagesInMosaic(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 Image3DVector::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 Image3DVector::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/bbcreaVtkImage3DVector.cxx~ b/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.cxx~ deleted file mode 100644 index 8be9357..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.cxx~ +++ /dev/null @@ -1,62 +0,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) -//===== -#include "bbcreaVtkImage3DVector.h" -#include "bbcreaVtkPackage.h" -#include "creaVtkClass.h" -#include "vtkImageData.h" - -namespace bbcreaVtk -{ - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Image3DVector) -BBTK_BLACK_BOX_IMPLEMENTATION(Image3DVector,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 Image3DVector::Process() -{ - - creaVtkClass cvtkc; - bbSetOutputOut( cvtkc.Ima3DVectorM ((unsigned int)bbGetInputNbImagesPerRow(), (unsigned int)bbGetInputNbImagesInMosaic(), bbGetInputIn() ) ); - -} -//===== -// 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 Image3DVector::bbUserSetDefaultValues() -{ - - bbSetInputNbImagesPerRow(0); - bbSetInputNbImagesInMosaic(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 Image3DVector::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 Image3DVector::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/bbcreaVtkImage3DVector.h b/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h deleted file mode 100644 index 8cba6c0..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h +++ /dev/null @@ -1,50 +0,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) -//===== -#ifndef __bbcreaVtkImage3DVector_h_INCLUDED__ -#define __bbcreaVtkImage3DVector_h_INCLUDED__ -#include "bbcreaVtk_EXPORT.h" -#include "bbtkAtomicBlackBox.h" -#include "iostream" - -#include "vtkImageData.h" -namespace bbcreaVtk -{ - -class bbcreaVtk_EXPORT Image3DVector - : - public bbtk::AtomicBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(Image3DVector,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_INPUT (NbImagesPerRow,int); - BBTK_DECLARE_INPUT (NbImagesInMosaic,int); - 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(Image3DVector,bbtk::AtomicBlackBox); -BBTK_NAME("Image3DVector"); -BBTK_AUTHOR("Carlos torres"); -BBTK_DESCRIPTION("carlos.torres@insa-lyon.fr -"); -BBTK_CATEGORY("empty"); -BBTK_INPUT(Image3DVector,In,"2D image list",std::vector,""); -BBTK_INPUT(Image3DVector,NbImagesPerRow,"Nb of Images Per Row ",int,""); -BBTK_INPUT(Image3DVector,NbImagesInMosaic,"Nb of Images In Mosaic ",int,""); -BBTK_OUTPUT(Image3DVector,Out,"3D image Vector",std::vector,""); -BBTK_END_DESCRIBE_BLACK_BOX(Image3DVector); -//===== -// 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 // __bbcreaVtkImage3DVector_h_INCLUDED__ - diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h~ b/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h~ deleted file mode 100644 index e3fad8c..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImage3DVector.h~ +++ /dev/null @@ -1,49 +0,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) -//===== -#ifndef __bbcreaVtkImage3DVector_h_INCLUDED__ -#define __bbcreaVtkImage3DVector_h_INCLUDED__ -#include "bbcreaVtk_EXPORT.h" -#include "bbtkAtomicBlackBox.h" -#include "iostream" - -namespace bbcreaVtk -{ - -class bbcreaVtk_EXPORT Image3DVector - : - public bbtk::AtomicBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(Image3DVector,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_INPUT (NbImagesPerRow,int); - BBTK_DECLARE_INPUT (NbImagesInMosaic,int); - 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(Image3DVector,bbtk::AtomicBlackBox); -BBTK_NAME("Image3DVector"); -BBTK_AUTHOR("Carlos torres"); -BBTK_DESCRIPTION("carlos.torres@insa-lyon.fr -"); -BBTK_CATEGORY("empty"); -BBTK_INPUT(Image3DVector,In,"2D image list",std::vector,""); -BBTK_INPUT(Image3DVector,NbImagesPerRow,"Nb of Images Per Row ",int,""); -BBTK_INPUT(Image3DVector,NbImagesInMosaic,"Nb of Images In Mosaic ",int,""); -BBTK_OUTPUT(Image3DVector,Out,"3D image Vector",std::vector,""); -BBTK_END_DESCRIBE_BLACK_BOX(Image3DVector); -//===== -// 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 // __bbcreaVtkImage3DVector_h_INCLUDED__ - diff --git a/lib/creaVtk/creaVtkHeartAngles.cpp~ b/lib/creaVtk/creaVtkHeartAngles.cpp~ deleted file mode 100644 index a51007a..0000000 --- a/lib/creaVtk/creaVtkHeartAngles.cpp~ +++ /dev/null @@ -1,173 +0,0 @@ -/* -# --------------------------------------------------------------------- -# -# 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 "creaVtkHeartAngles.h" -#include -#include - -creaVtkHeartAngles::creaVtkHeartAngles() -{ -} - -creaVtkHeartAngles::~creaVtkHeartAngles() -{ -} - -double creaVtkHeartAngles::alpha (double P0a, double P0b,double P0c, double vx, double vy, double vz, double vxp, double vyp, double vzp) -{ - double a=P0a,b=P0b,c=P0c; - double x=vx,y=vy,z=vz; - double xp=vxp,yp=vyp,zp=vzp; - double alpha; - -//Calcular el ángulo que forman las rectas, sabiendo sus vectores directores. - double cosAlpha = ( ( (x-a)*(xp-a) )+( (y-b)*(yp-b) )+( (z-c)*(zp-c) ) )/sqrt((( (pow(x,2.0)-pow(a,2.0)) + (pow(y,2.0)-pow(b,2.0)) + (pow(z,2.0)-pow(c,2.0)) )*( (pow(xp,2.0)-pow(a,2.0)) + (pow(yp,2.0)-pow(b,2.0)) + (pow(zp,2.0)-pow(c,2.0)) ) )); - - alpha = (180 * acos(fabs(cosAlpha)))/M_PI; - //std::cout << "Angulo Alpha: " << alpha << std::endl; - double ent = floor(alpha); - double al = alpha - ent; - double min = al * 60; - //std::cout << "minutos: " << min << std::endl; - std::cout << "Grados: "<< ent <<" minutos: " << floor(min) << std::endl; - return alpha; -} - -double creaVtkHeartAngles::beta (double P0a, double P0b,double P0c, double P3x, double P3y, double P3z, double P4x, double P4y, double P4z) -{ - double a=P0a,b=P0b,c=P0c; - double x=P3x,y=P3y,z=P3z; - double xp=P4x,yp=P4y,zp=P4z; - double beta; - -//Calcular el ángulo que forman las rectas, sabiendo sus vectores directores. - double cosBeta = ( ( (x-a)*(xp-a) )+( (y-b)*(yp-b) )+( (z-c)*(zp-c) ) )/sqrt((( (pow(x,2.0)-pow(a,2.0)) + (pow(y,2.0)-pow(b,2.0)) + (pow(z,2.0)-pow(c,2.0)) )*( (pow(xp,2.0)-pow(a,2.0)) + (pow(yp,2.0)-pow(b,2.0)) + (pow(zp,2.0)-pow(c,2.0)) ) )); - - beta = (180 * acos(fabs(cosBeta)))/M_PI; - //std::cout << "Angulo Beta: " << beta << std::endl; - double ent = floor(beta); - double al = beta - ent; - double min = al * 60; - //std::cout << "minutos: " << min << std::endl; - std::cout << "Grados: "<< ent <<" minutos: " << floor(min) << std::endl; - return beta; -} - -double * creaVtkHeartAngles::vectorProjection (double plX, double plY, double plZ, double nX, double nY, double nZ, double vX, double vY, double vZ) -{ - //punto del plano - double plx=plX, ply=plY, plz=plZ; - //normalPlano - double nx=nX, ny=nY, nz=nZ; - //vector V - double vx=vX, vy=vY, vz=vZ; - - //distancia del punto al plano - double dist; - //vector proyectado - double vpx, vpy, vpz; - double proj [3]; - - dist = ply - vy; - //std::cout << dist << std - vpx = vx - (dist * nx); - vpy = vy - (dist * ny); - vpz = vz - (dist * nz); - - proj[0]=vpx; - proj[1]=vpy; - proj[2]=vpz; - - return proj; -} - -double *creaVtkHeartAngles::intersectionPlaneLine(double plx1, double ply1, double plz1, double plx2, double ply2, double plz2, double plx3, double ply3, double plz3, double px1, double py1, double pz1,double px2, double py2, double pz2) -{ - double puntoCorte[3]; - - double Plx1 = plx1, Ply1 = ply1, Plz1 = plz1, Plx2 = plx2, Ply2 = ply2, Plz2 = plz2, Plx3 = plx3, Ply3 = ply3, Plz3 = plz3; - double Px1 = px1, Py1 = py1, Pz1 = pz1, Px2 = px2, Py2 = py2, Pz2 = pz2; - - //Calculo del plano - - double aX = ((Ply2-Ply1)*(Plz3-Plz1)-(Ply3-Ply1)*(Plz2-Plz1)); - double a = (Plx1)*((Ply2-Ply1)*(Plz3-Plz1)-(Ply3-Ply1)*(Plz2-Plz1)); - - double bX = ((Plx2-Plx1)*(Plz3-Plz1)-(Plx3-Plx1)*(Plz2-Plz1)); - double b = (Ply1)*((Plx2-Plx1)*(Plz3-Plz1)-(Plx3-Plx1)*(Plz2-Plz1)); - - double cX = ((Plx2-Plx1)*(Ply3-Ply1)-(Plx3-Plx1)*(Ply2-Ply1)); - double c = (Plz1)*((Plx2-Plx1)*(Ply3-Ply1)-(Plx3-Plx1)*(Ply2-Ply1)); - - double r = a + b + c; - std::cout << "ecuacion: " << aX << "," << a << "," << bX << "," << b << "," << cX << "," << c << std::endl; - std::cout << "r: " << r << std::endl; - - //Calculo del vector director - - double vdirx = Px2 - Px1; - double vdiry = Py2 - Py1; - double vdirz = Pz2 - Pz1; - - std::cout << "vdirx: " << vdirx << " vdiry: " << vdiry << " vdirz: " << vdirz << std::endl; - - //Se igualan las formulas del plano y la recta - //x=Px1+vdirx, y=Py1+vdiry, z=Pz1+vdirz - - double eRes = aX*Px1 + bX*Py1 + cX*Pz1; - double eResT = aX*vdirx + bX*vdiry + cX*vdirz; - std::cout << "eRes: " << eRes << " eResT: " << eResT << std::endl; - //Calculo del punto solucion - if(eResT == 0){ - std::cout << "Soluciones infinitas... " << std::endl; - } - else { - double t = (((-1)*eRes)-r)/eResT; - - double Px = Px1 + (t * vdirx); - double Py = Py1 + (t * vdiry); - double Pz = Pz1 + (t * vdirz); - - std::cout << "px: " << Px << " py: " << Py << " pz: " << Pz << std::endl; - - puntoCorte[0] = Px; - puntoCorte[1] = Py; - puntoCorte[2] = Pz; - } - return puntoCorte; -} - -//--------------------------------------------- -//Method template -//--------------------------------------------- -/* -void creaVtkHeartAngles::FunctionName(int& parameterA) -{ - parameterA = 2 * parameterA; - return; -} -*/ diff --git a/lib/creaVtk/creaVtkHeartAngles.h~ b/lib/creaVtk/creaVtkHeartAngles.h~ deleted file mode 100644 index 14634a3..0000000 --- a/lib/creaVtk/creaVtkHeartAngles.h~ +++ /dev/null @@ -1,64 +0,0 @@ -/* -# --------------------------------------------------------------------- -# -# 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 _CREAVTKHEARTANGLES_H_ -#define _CREAVTKHEARTANGLES_H_ - -//--------------------------------------------- -// Class Name: creaVtkHeartAngles -// [classdescription] -//--------------------------------------------- - -class creaVtkHeartAngles -{ - -//--------------------------------------------- -//Methods and attributes exposed to other classes -//--------------------------------------------- -public : - creaVtkHeartAngles(); - ~creaVtkHeartAngles(); - -//--Method template---------------------------- -// void FunctionName(int& parameterA); - - -//--------------------------------------------- -//Methods and attributes exposed only to classes -//that are derived from this class -//--------------------------------------------- -protected: - -//--------------------------------------------- -//Methods and attributes only visible by this class -//--------------------------------------------- -private: - -}; - -//-end of _CREAVTKHEARTANGLES_H_------------------------------------------------------ -#endif diff --git a/lib/creaVtk/creaVtkIma3DVector.cpp b/lib/creaVtk/creaVtkIma3DVector.cpp deleted file mode 100644 index 339e1cc..0000000 --- a/lib/creaVtk/creaVtkIma3DVector.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -# --------------------------------------------------------------------- -# -# 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 "creaVtkIma3DVector.h" - -creaVtkIma3DVector::creaVtkIma3DVector() -{ -} - -creaVtkIma3DVector::~creaVtkIma3DVector() -{ -} - -std::vector creaVtkIma3DVector::Ima3DVectorM (int NbImagesPerRow, int NbImagesInMosaic, std::vector bbGetInputIn) -{ - int nbImagesPerRow = NbImagesPerRow; - int nbImagesInMosaic = NbImagesInMosaic; - - if (nbImagesPerRow == 0 || nbImagesInMosaic == 0) { - std::cout << "Not possible" << std::endl; - } - - std::vector imageIn = bbGetInputIn; - - std::vector mImageOut; - for (int i = 0 ; i < (unsigned int)imageIn.size() ; i++) { - mImageOut.push_back( unMosaic(imageIn[i], NbImagesPerRow, NbImagesInMosaic) ); - } - - return mImageOut; -} - -vtkImageData * creaVtkIma3DVector::unMosaic(vtkImageData *imageIn, int nbImagesPerRow, int numberOfImagesInMosaic) -{ - int inputdims[3]; - int outputdims[3]; - imageIn->GetDimensions (inputdims); - unsigned short *input = (unsigned short *)(imageIn->GetScalarPointer()); - imageIn->Update(); - - unsigned int div = (unsigned int)ceil(sqrt( (double)numberOfImagesInMosaic ) ); - outputdims[0] = inputdims[0] / div; - outputdims[1] = inputdims[1] / div; - outputdims[2] = numberOfImagesInMosaic; - - vtkImageData *vtkImageOut; - vtkImageOut = vtkImageData::New(); - vtkImageOut->SetDimensions( outputdims ); - vtkImageOut->SetExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1); - vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1); - vtkImageOut->SetNumberOfScalarComponents(1); -//vtkImageOut->SetSpacing( blabla ); - vtkImageOut->SetScalarType( VTK_UNSIGNED_SHORT ); - vtkImageOut->AllocateScalars(); - vtkImageOut->Update(); - - unsigned short *output =(unsigned short *)(vtkImageOut->GetScalarPointer()); - - unsigned short *dest = output; - int dimXImageElem = outputdims[0]; - int dimYImageElem = outputdims[1]; - int lgrImage = dimXImageElem*dimYImageElem; - int debImage; - for (int i=0; i -#include "iostream" -#include "vtkImageData.h" - -//--------------------------------------------- -// Class Name: creaVtkIma3DVector -// [classdescription] -//--------------------------------------------- - -class creaVtkIma3DVector -{ - -//--------------------------------------------- -//Methods and attributes exposed to other classes -//--------------------------------------------- -public : - creaVtkIma3DVector(); - ~creaVtkIma3DVector(); - std::vector Ima3DVectorM (int NbImagesPerRow, int NbImagesInMosaic, std::vector bbGetInputIn); - vtkImageData * unMosaic(vtkImageData *imageIn, int nbImagesPerRow, int numberOfImagesInMosaic); - -//--Method template---------------------------- -// void FunctionName(int& parameterA); - - -//--------------------------------------------- -//Methods and attributes exposed only to classes -//that are derived from this class -//--------------------------------------------- -protected: - -//--------------------------------------------- -//Methods and attributes only visible by this class -//--------------------------------------------- -private: - -}; - -//-end of _CREAVTKIMA3DVECTOR_H_------------------------------------------------------ -#endif diff --git a/lib/creaVtk/creaVtkIma3DVector.h~ b/lib/creaVtk/creaVtkIma3DVector.h~ deleted file mode 100644 index f3692a1..0000000 --- a/lib/creaVtk/creaVtkIma3DVector.h~ +++ /dev/null @@ -1,64 +0,0 @@ -/* -# --------------------------------------------------------------------- -# -# 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 _CREAVTKIMA3DVECTOR_H_ -#define _CREAVTKIMA3DVECTOR_H_ - -//--------------------------------------------- -// Class Name: creaVtkIma3DVector -// [classdescription] -//--------------------------------------------- - -class creaVtkIma3DVector -{ - -//--------------------------------------------- -//Methods and attributes exposed to other classes -//--------------------------------------------- -public : - creaVtkIma3DVector(); - ~creaVtkIma3DVector(); - -//--Method template---------------------------- -// void FunctionName(int& parameterA); - - -//--------------------------------------------- -//Methods and attributes exposed only to classes -//that are derived from this class -//--------------------------------------------- -protected: - -//--------------------------------------------- -//Methods and attributes only visible by this class -//--------------------------------------------- -private: - -}; - -//-end of _CREAVTKIMA3DVECTOR_H_------------------------------------------------------ -#endif -- 2.45.0