From 84940907d0e4f71d2f4f3c31e568006b5034b2f7 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 23 Sep 2005 05:48:36 +0000 Subject: [PATCH] To remove messages --- src/PIPELINE/VISU_GaussPointsPL.cxx | 20 ------------------ src/PIPELINE/VISU_img2vti.cxx | 32 ++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index c335a520..014eb467 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -112,10 +112,6 @@ VISU_GaussPointsPL myGeomFilter->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); myPSMapper->SetInput( myGeomFilter->GetOutput() ); - - //vtkXMLImageDataReader* aReader = vtkXMLImageDataReader::New(); - //aReader->SetFileName( "/dn06/salome/ouv/SALOME3/TextureAlphaChannel.vti" ); - //myPSMapper->InitTexture( aReader->GetOutput() ); } //---------------------------------------------------------------------------- @@ -249,12 +245,6 @@ VISU_GaussPointsPL ::SetRelativeMinSize(float theRelativeMinSize) { myRelativeMinSize = theRelativeMinSize; - /* - cout << "VISU_GaussPointsPL::SetRelativeMinSize "; - cout << myAverageCellSize << " * "; - cout << myRelativeMinSize << " * 1000.0 = "; - cout << 1000.0 * myAverageCellSize * myRelativeMinSize << endl; - */ myPSMapper->SetPointSpriteSize( 0.0 ); myPSMapper->SetPointSpriteMinSize( 1000.0 * myAverageCellSize * myRelativeMinSize ); @@ -267,12 +257,6 @@ VISU_GaussPointsPL ::SetRelativeMaxSize(float theRelativeMaxSize) { myRelativeMaxSize = theRelativeMaxSize; - /* - cout << "VISU_GaussPointsPL::SetRelativeMaxSize "; - cout << myAverageCellSize << " * "; - cout << myRelativeMaxSize << " * 1000.0 = "; - cout << 1000.0 * myAverageCellSize * myRelativeMaxSize << endl; - */ myPSMapper->SetPointSpriteSize( 0.0 ); myPSMapper->SetPointSpriteMaxSize( 1000.0 * myAverageCellSize * myRelativeMaxSize ); @@ -284,7 +268,6 @@ void VISU_GaussPointsPL ::SetMagnification(float theMagnification) { - //cout << "VISU_GaussPointsPL::SetMagnification " << theMagnification << endl;; myPSMapper->SetPointSpriteMagnification( theMagnification ); Modified(); @@ -357,8 +340,5 @@ void VISU_GaussPointsPL ::SetImageData(vtkImageData* theImageData) { - //cout << "VISU_GaussPointsPL::SetImageData " << theImageData << endl; - //theImageData->Print( cout ); - myPSMapper->SetImageData( theImageData ); } diff --git a/src/PIPELINE/VISU_img2vti.cxx b/src/PIPELINE/VISU_img2vti.cxx index 31ee9bcb..8cc0a475 100644 --- a/src/PIPELINE/VISU_img2vti.cxx +++ b/src/PIPELINE/VISU_img2vti.cxx @@ -30,9 +30,15 @@ #include #include +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + int main( int argc, char** argv ) { - std::cout << "Converting the image to VTI format" << std::endl; + if(MYDEBUG) std::cout << "Converting the image to VTI format" << std::endl; if( argc != 4 ) { @@ -40,24 +46,26 @@ int main( int argc, char** argv ) return 1; } - std::cout << argv[1] << std::endl; - std::cout << argv[2] << std::endl; - std::cout << argv[3] << std::endl; + if(MYDEBUG){ + std::cout << argv[1] << std::endl; + std::cout << argv[2] << std::endl; + std::cout << argv[3] << std::endl; + } - vtkImageReader2* aReader; + vtkImageReader2* aReader = NULL; if( !strcmp( argv[1], "BMP" ) || !strcmp( argv[1], "bmp" ) ) { - std::cout << "Input image format - BMP" << std::endl; + if(MYDEBUG) std::cout << "Input image format - BMP" << std::endl; aReader = vtkBMPReader::New(); } else if( !strcmp( argv[1], "PNG" ) || !strcmp( argv[1], "png" ) ) { - std::cout << "Input image format - PNG" << std::endl; + if(MYDEBUG) std::cout << "Input image format - PNG" << std::endl; aReader = vtkPNGReader::New(); } else if( !strcmp( argv[1], "JPG" ) || !strcmp( argv[1], "jpg" ) ) { - std::cout << "Input image format - JPG" << std::endl; + if(MYDEBUG) std::cout << "Input image format - JPG" << std::endl; aReader = vtkJPEGReader::New(); } else @@ -65,12 +73,16 @@ int main( int argc, char** argv ) std::cout << "Unknown input image format... Must be BMP, PNG or JPG." << std::endl; return 1; } - aReader->SetFileName( argv[2] ); aReader->Update(); vtkXMLImageDataWriter* aWriter = vtkXMLImageDataWriter::New(); aWriter->SetInput( aReader->GetOutput() ); aWriter->SetFileName( argv[3] ); - return 1 - aWriter->Write(); + aWriter->Write(); + + aWriter->Delete(); + aReader->Delete(); + + return 0; } -- 2.39.2