Skip to content

Commit 13be4a0

Browse files
committed
COMP: Address unused outputPolyDataFileName
Addresses: st.cxx:67:16: warning: unused variable ‘outputPolyDataFileName’ [-Wunused-variable] 67 | const char * outputPolyDataFileName = argv[1]; | ^~~~~~~~~~~~~~~~~~~~~~
1 parent db247e3 commit 13be4a0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/itkMeshToPolyDataFilterTest.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
*=========================================================================*/
1818

1919
#include "itkMeshToPolyDataFilter.h"
20+
#include "itkPolyDataToMeshFilter.h"
2021

2122
#include "itkCommand.h"
2223
#include "itkMeshFileReader.h"
24+
#include "itkMeshFileWriter.h"
2325
#include "itkMesh.h"
2426
#include "itkTestingMacros.h"
2527
#include "itkMath.h"
@@ -110,5 +112,15 @@ int itkMeshToPolyDataFilterTest( int argc, char * argv[] )
110112
ITK_TEST_EXPECT_EQUAL( polyData->GetPolygons()->GetElement( 5 ), 4 );
111113
ITK_TEST_EXPECT_EQUAL( polyData->GetPolygons()->GetElement( 6 ), 252 );
112114

115+
using PolyDataToMeshFilterType = itk::PolyDataToMeshFilter<PolyDataType>;
116+
auto polyDataToMeshFilter = PolyDataToMeshFilterType::New();
117+
polyDataToMeshFilter->SetInput( polyData );
118+
119+
using MeshWriterType = itk::MeshFileWriter<MeshType>;
120+
auto meshWriter = MeshWriterType::New();
121+
meshWriter->SetFileName( outputPolyDataFileName );
122+
meshWriter->SetInput( polyDataToMeshFilter->GetOutput() );
123+
ITK_TRY_EXPECT_NO_EXCEPTION( meshWriter->Update() );
124+
113125
return EXIT_SUCCESS;
114126
}

0 commit comments

Comments
 (0)