From b5ae034170e154e060837d657257f22c422d4b21 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 12 Feb 2014 15:00:59 +0100 Subject: [PATCH] 2217 creaVtk Support New Normal Correction of Heart Angles Box --- bbtk_creaVtk_PKG/CMakeLists.txt | 2 +- .../src/bbcreaVtkFromVtk4DToItk4D.cxx | 64 ---- .../src/bbcreaVtkFromVtk4DToItk4D.h | 46 --- lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp | 273 ------------------ lib/creaVtk/creaVtkFromVtk4DToItk4D.h | 66 ----- lib/creaVtk/creaVtkHeartAngles.cpp | 4 +- .../creaVtkUnMosaicVectorVtkImageData.cpp | 12 +- lib/creaVtk/vtkTensorsVisu.cpp | 56 +++- lib/creaVtk/vtkTensorsVisu.h | 14 +- 9 files changed, 66 insertions(+), 471 deletions(-) delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx delete mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h delete mode 100644 lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp delete mode 100644 lib/creaVtk/creaVtkFromVtk4DToItk4D.h diff --git a/bbtk_creaVtk_PKG/CMakeLists.txt b/bbtk_creaVtk_PKG/CMakeLists.txt index 69a55c4..94a5bb8 100644 --- a/bbtk_creaVtk_PKG/CMakeLists.txt +++ b/bbtk_creaVtk_PKG/CMakeLists.txt @@ -77,7 +77,7 @@ SET(USE_BOOST ON) SET(${BBTK_PACKAGE_NAME}_USE_PACKAGES # std # wx - # itk + itk # vtk # ... ) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx deleted file mode 100644 index 52ddeab..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.cxx +++ /dev/null @@ -1,64 +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 "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() -{ -printf("EED FromVtk4DToItk4D::Process 1\n "); -//EED creaVtkFromVtk4DToItk4D prs; - creaVtkFromVtk4DToItk4D prs; -printf("EED FromVtk4DToItk4D::Process 2\n "); - prs.SetImage4Dvtk(bbGetInputIn()); -printf("EED FromVtk4DToItk4D::Process 3\n "); - //CT Bug. Cant declare output image in .h - prs.Process(); -//EED bbSetOutputOut( ); -} -//===== -// 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.h b/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h deleted file mode 100644 index 772a837..0000000 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkFromVtk4DToItk4D.h +++ /dev/null @@ -1,46 +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 __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ -#define __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ -#include "bbcreaVtk_EXPORT.h" -#include "bbtkAtomicBlackBox.h" -#include "iostream" - -#include "vtkImageData.h" -#include -//#include "itkImage.h" -#include "creaVtkFromVtk4DToItk4D.h" - -namespace bbcreaVtk -{ - -class bbcreaVtk_EXPORT FromVtk4DToItk4D - : - public bbtk::AtomicBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(FromVtk4DToItk4D,bbtk::AtomicBlackBox); - BBTK_DECLARE_INPUT(In,std::vector ); - BBTK_DECLARE_OUTPUT(Out, Image4DType::Pointer ); - BBTK_PROCESS(Process); - void Process(); - -}; - -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", Image4DType::Pointer ,""); - -BBTK_END_DESCRIBE_BLACK_BOX(FromVtk4DToItk4D); - -} -// EO namespace bbcreaVtk - -#endif // __bbcreaVtkFromVtk4DToItk4D_h_INCLUDED__ - diff --git a/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp b/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp deleted file mode 100644 index 369bcbb..0000000 --- a/lib/creaVtk/creaVtkFromVtk4DToItk4D.cpp +++ /dev/null @@ -1,273 +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 "creaVtkFromVtk4DToItk4D.h" -//#include "itkImage.h" - -//#include - - -//#include "itkImageRegionConstIterator.h" -#include "itkImageRegionIterator.h" -// #include "itkImageFileReader.h" -#include - -//template -//creaVtkFromVtk4DToItk4D::creaVtkFromVtk4DToItk4D() -creaVtkFromVtk4DToItk4D::creaVtkFromVtk4DToItk4D() -{ -} - -//EED template -//EED creaVtkFromVtk4DToItk4D::~creaVtkFromVtk4DToItk4D() -creaVtkFromVtk4DToItk4D::~creaVtkFromVtk4DToItk4D() -{ -} - -//EED template -//EED void creaVtkFromVtk4DToItk4D::SetImage4D(TImage *image) -//EED { -//EED _image4D = image; -//EED } - - -Image4DType::Pointer creaVtkFromVtk4DToItk4D::GetResult() -{ - return _image4D; -} - - -//EED template -//EED void creaVtkFromVtk4DToItk4D::SetImage4Dvtk( std::vector image) -void creaVtkFromVtk4DToItk4D::SetImage4Dvtk( std::vector image) -{ - _image4Dvtk = image; -} - -//EED template -//EED std::vector > creaVtkFromVtk4DToItk4D::Process() -void 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; - } - } -*/ - - -/* EED2 - 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; - }*/ - - - -/* EED - 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]; - } // for - 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; - } // while -//EED outputImage4D[k]=outputImage; - } // for k -//EED return outputImage4D; - -*/ - - - -// http://www.itk.org/pipermail/insight-users/2003-December/005796.html -// http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/InvertIntensityImageFilter - - - int ext[6]; - int dimX, dimY, dimZ; - long int sizeimage; - unsigned int k, i; - - _image4Dvtk[0]->GetWholeExtent(ext); - dimX = ext[1]-ext[0]+1; - dimY = ext[3]-ext[2]+1; - dimZ = ext[5]-ext[4]+1; - sizeimage = dimX*dimY*dimZ; - - - - typedef itk::ImageRegionIterator< Image4DType > Iterator4D; -// typedef itk::ImageRegionConstIterator< Image4DType > Iterator4D; -// typedef itk::ImageRegionConstIteratorWithIndex< Image4DType > Iterator4D; - - - _image4D = Image4DType::New(); - - Image4DType::RegionType region; - Image4DType::IndexType start; - start[0] = 0; - start[1] = 0; - start[2] = 0; - start[3] = 0; - - Image4DType::SizeType size; - unsigned int NumRows = dimX; - unsigned int NumCols = dimY; - unsigned int NumSlices = dimZ; - unsigned int NumVolumes = _image4Dvtk.size(); - size[0] = NumRows; - size[1] = NumCols; - size[2] = NumSlices; - size[3] = NumVolumes; - - region.SetSize(size); - region.SetIndex(start); - - _image4D->SetRegions(region); - _image4D->Allocate(); - - -// Iterator4D it4( image4D, image4D->GetBufferedRegion() ); - Iterator4D it4( _image4D, _image4D->GetLargestPossibleRegion() ); - it4.GoToBegin(); - for(k = 0 ; k < _image4Dvtk.size() ; k++) - { - unsigned short * ptrVtkImage; - ptrVtkImage = (unsigned short *)_image4Dvtk[k]->GetScalarPointer(); - for (i=0; i< sizeimage;i++) - { - it4.Set( *ptrVtkImage ); -// *it4 = *ptrVtkImage; -// unsigned short q= it4.Get(); - ++it4; - ptrVtkImage++; - } - } -} -//--------------------------------------------- -//Method template -//--------------------------------------------- -/* -void creaVtkFromVtk4DToItk4D::FunctionName(int& parameterA) -{ - parameterA = 2 * parameterA; - return; -} -*/ diff --git a/lib/creaVtk/creaVtkFromVtk4DToItk4D.h b/lib/creaVtk/creaVtkFromVtk4DToItk4D.h deleted file mode 100644 index 3cc462e..0000000 --- a/lib/creaVtk/creaVtkFromVtk4DToItk4D.h +++ /dev/null @@ -1,66 +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 _CREAVTKFROMVTK4DTOITK4D_H_ -#define _CREAVTKFROMVTK4DTOITK4D_H_ -#include "vtkImageData.h" -#include - -#include "itkImage.h" - -//EED template - -typedef unsigned short PixelType; -typedef itk::Image< PixelType, 4 > Image4DType; - -class creaVtkFromVtk4DToItk4D -{ -public : - creaVtkFromVtk4DToItk4D(); - ~creaVtkFromVtk4DToItk4D(); - -//EED void SetImage4D(TImage *image); - - void SetImage4Dvtk(std::vector image); -//EED std::vector > Process(); - void Process(); - Image4DType::Pointer GetResult(); - -protected: - -private: - -//EED TImage* _image4D; -//EED2 itk::Image _image4D; - - Image4DType::Pointer _image4D; - std::vector _image4Dvtk; -}; - - -//-end of _CREAVTKFROMVTK4DTOITK4D_H_------------------------------------------------------ -#endif diff --git a/lib/creaVtk/creaVtkHeartAngles.cpp b/lib/creaVtk/creaVtkHeartAngles.cpp index 26de410..bb74fb9 100644 --- a/lib/creaVtk/creaVtkHeartAngles.cpp +++ b/lib/creaVtk/creaVtkHeartAngles.cpp @@ -248,9 +248,9 @@ std::cout << "CFT creaVtkHeartAngles::calculateImages Start"<=90&&a<=360) { std::cout << " numTuple: " << numTuple << " a: " << a << " b: " << b << std::endl; } if(p1==0&&p2==0&&p3==0){ unsigned char *zPtr1 = (unsigned char *) alphaImage->GetScalarPointer( i , j , k ); - *zPtr1 = (unsigned char)255; + *zPtr1 = (unsigned char)0; unsigned char *zPtr2 = (unsigned char *) betaImage->GetScalarPointer( i , j , k ); - *zPtr2 = (unsigned char)255; + *zPtr2 = (unsigned char)0; }else{ unsigned char *zPtr1 = (unsigned char *) alphaImage->GetScalarPointer( i , j , k ); *zPtr1 = (unsigned char)a; diff --git a/lib/creaVtk/creaVtkUnMosaicVectorVtkImageData.cpp b/lib/creaVtk/creaVtkUnMosaicVectorVtkImageData.cpp index 2392af9..2e7847c 100644 --- a/lib/creaVtk/creaVtkUnMosaicVectorVtkImageData.cpp +++ b/lib/creaVtk/creaVtkUnMosaicVectorVtkImageData.cpp @@ -40,8 +40,9 @@ std::vector creaVtkUnMosaicVectorVtkImageData::unMosaicVectorVtkI int nbImagesPerRow = NbImagesPerRow; int nbImagesInMosaic = NbImagesInMosaic; - if (nbImagesPerRow == 0 || nbImagesInMosaic == 0) { - std::cout << "Not possible" << std::endl; + if (nbImagesPerRow == 0 || nbImagesInMosaic == 0) + { + std::cout << "VtkUnMosaicVectorVtkImageData ERROR: The number of Images by mosaic is not set " << std::endl; } std::vector imageIn = bbGetInputIn; @@ -85,10 +86,13 @@ vtkImageData * creaVtkUnMosaicVectorVtkImageData::unMosaic(vtkImageData *imageIn int dimYImageElem = outputdims[1]; int lgrImage = dimXImageElem*dimYImageElem; int debImage; - for (int i=0; i=0; i--) { debImage=(i/nbImagesPerRow) * lgrImage*nbImagesPerRow + (i%nbImagesPerRow)*dimXImageElem; - for(int j=0; j=0; j--) { memcpy(dest, input+debImage, dimXImageElem*sizeof(unsigned short)); debImage += dimXImageElem*nbImagesPerRow; diff --git a/lib/creaVtk/vtkTensorsVisu.cpp b/lib/creaVtk/vtkTensorsVisu.cpp index 53f5517..5ed091f 100644 --- a/lib/creaVtk/vtkTensorsVisu.cpp +++ b/lib/creaVtk/vtkTensorsVisu.cpp @@ -33,6 +33,7 @@ vtkTensorsVisu::vtkTensorsVisu() : vtkVectorsTensorsVisuBase() { ss = vtkSphereSource::New(); + superquadratic = vtkSuperquadricSource::New(); cs = vtkCubeSource::New(); tg = vtkTensorGlyph::New(); pdn = vtkPolyDataNormals::New(); @@ -53,16 +54,19 @@ printf("EED vtkTensorsVisu::Process Start\n"); if (_active==true){ - std::string source="sphere"; +// std::string source="sphere"; + std::string source="superquadratic"; if(source=="sphere") { tg->SetSource(ss->GetOutput()); + } else if(source=="cube") { + tg->SetSource(cs->GetOutput()); + }else if(source=="superquadratic") { + superquadratic->SetThetaResolution(20); + superquadratic->SetPhiResolution(20); + tg->SetSource(superquadratic->GetOutput()); + } else { } - else if(source=="cube") - { - tg->SetSource(ss->GetOutput()); - } - else{} tg->SetInput( GetDataObject() ); @@ -118,7 +122,7 @@ printf("EED vtkTensorsVisu::Process Start\n"); _actor->GetProperty()->SetOpacity( GetOpacity() ); tg->ColorGlyphsOn(); - tg->ExtractEigenvaluesOn(); +// tg->ExtractEigenvaluesOn(); tg->SetColorModeToEigenvalues(); _pdm->SetLookupTable( _LutEED ); @@ -127,7 +131,7 @@ printf("EED vtkTensorsVisu::Process Start\n"); //int tcg = tg->GetColorGlyphs(); // tg->SetColorGlyphs(10); - //tg->SetColorModeToScalars(); +// tg->SetColorModeToScalars(); //tg->ThreeGlyphsOn(); @@ -146,15 +150,49 @@ printf("EED vtkTensorsVisu::Process Start\n"); + tg->Print( std::cout ); + printf("EED vtkTensorsVisu::Process ------------------------------------------\n"); + pd->Print( std::cout ); + + tg->Update(); vtkPolyData *pd = pdn->GetOutput(); vtkPointData *pointdata = pd->GetPointData(); + + + printf("EED vtkTensorsVisu::Process XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx\n"); + pointdata->Print( std::cout ); + + int aa = pd->GetNumberOfPieces (); + int bb = pd->GetNumberOfVerts (); + int cc = pd->GetNumberOfLines (); + int dd = pd->GetNumberOfPolys (); + int ee = pd->GetNumberOfStrips (); + int ff = pd->GetNumberOfCells(); + + printf("EED vtkTensorsVisu::Process %d %d %d %d %d %d \n", aa,bb,cc,dd,ee,ff); + + vtkPolyData *ttt = (vtkPolyData *)GetDataObject(); + int numPnts = ttt->GetNumberOfPoints(); + printf("EED vtkTensorsVisu::Process numPnts %d \n", numPnts ); + + + vtkIdType numSourcePts, numSourceCells; + vtkPoints *sourcePts; + sourcePts = tg->GetSource()->GetPoints(); + numSourcePts = sourcePts->GetNumberOfPoints(); + numSourceCells = tg->GetSource()->GetNumberOfCells(); + printf("EED vtkTensorsVisu::Process numSourcePts %d numSourceCells %d\n", numSourcePts, numSourceCells); + + + int i,sizeDa = pointdata->GetNumberOfArrays(); printf("EED vtkTensorsVisu::Process sizeDa %d \n", sizeDa ); for (i=0;iGetArrayName(i) , pointdata->GetArray(i)->GetSize() ); + int faces = pointdata->GetArray(i)->GetSize() / numPnts; + printf("EED vtkTensorsVisu::Process-name %d, %s, size=%d %d \n", i, pointdata->GetArrayName(i) , pointdata->GetArray(i)->GetSize(), faces ); } diff --git a/lib/creaVtk/vtkTensorsVisu.h b/lib/creaVtk/vtkTensorsVisu.h index ef8bd53..cdfdb93 100644 --- a/lib/creaVtk/vtkTensorsVisu.h +++ b/lib/creaVtk/vtkTensorsVisu.h @@ -35,6 +35,7 @@ #include "vtkPointData.h" #include "vtkSphereSource.h" #include "vtkTensorGlyph.h" +#include "vtkSuperquadricSource.h" #include "vtkVectorsTensorsVisuBase.h" @@ -68,12 +69,13 @@ protected: //--------------------------------------------- private: - vtkSmartPointer ss; - vtkSmartPointer cs; - vtkSmartPointer tg; - vtkSmartPointer pdn; - vtkSmartPointer pd; - vtkSmartPointer pod; + vtkSmartPointer ss; + vtkSmartPointer superquadratic; + vtkSmartPointer cs; + vtkSmartPointer tg; + vtkSmartPointer pdn; + vtkSmartPointer pd; + vtkSmartPointer pod; }; //-end of _VTKTENSORSVISU_H_------------------------------------------------------ -- 2.45.0