Skip to content

Commit 2a8937e

Browse files
committed
COMP: Do not write transforms to file with wasm
In itkElastixRegistrationMethod.hxx.
1 parent 7dfaa81 commit 2a8937e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Core/Main/itkElastixRegistrationMethod.hxx

+4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040

4141
#include "elxLibUtilities.h"
4242

43+
#ifndef __wasm32__
4344
#include <itkTransformFileWriter.h>
45+
#endif
4446

4547
#include <algorithm> // For find.
4648
#include <memory> // For unique_ptr.
@@ -268,6 +270,7 @@ ElastixRegistrationMethod<TFixedImage, TMovingImage>::GenerateData()
268270
{
269271
const auto transformFileName = "InitialTransform." + std::to_string(i) + '.' + outputFileNameExtension;
270272

273+
#ifndef __wasm32__
271274
// Write the external transform to file.
272275
const auto writer = itk::TransformFileWriter::New();
273276
writer->SetInput(externalTransform);
@@ -278,6 +281,7 @@ ElastixRegistrationMethod<TFixedImage, TMovingImage>::GenerateData()
278281
transformFound->second = { "File" };
279282
transformParameterMap["TransformFileName"] = { transformFileName };
280283
transformParameterMap.erase("TransformAddress");
284+
#endif
281285
}
282286
}
283287

0 commit comments

Comments
 (0)