Skip to content

Commit

Permalink
feat(Python): Add IO wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Dec 16, 2022
1 parent 33e199c commit a0e6705
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/itkWASMImageIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ class WebAssemblyInterface_EXPORT WASMImageIO: public StreamingImageIOBase
/** Reads the data from disk into the memory buffer provided. */
void Read(void *buffer) override;

#if !defined(ITK_WRAPPING_PARSER)
/** Set the JSON representation of the image information. */
void SetJSON(rapidjson::Document & json);
#endif

/** Determine the file type. Returns true if this ImageIO can write the
* file specified. */
Expand All @@ -79,8 +81,10 @@ class WebAssemblyInterface_EXPORT WASMImageIO: public StreamingImageIOBase
/** Set the spacing and dimension information for the set filename. */
void WriteImageInformation() override;

#if !defined(ITK_WRAPPING_PARSER)
/** Get the JSON representation of the image information. */
rapidjson::Document GetJSON();
#endif

/** Writes the data to disk from the memory buffer provided. Make sure
* that the IORegions has been set properly. */
Expand Down
2 changes: 2 additions & 0 deletions include/itkWASMMeshIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ class WebAssemblyInterface_EXPORT WASMMeshIO: public MeshIOBase

void Write() override;

#if !defined(ITK_WRAPPING_PARSER)
/** Get the JSON representation of the mesh information. */
rapidjson::Document GetJSON();
#endif

static size_t ITKComponentSize( const CommonEnums::IOComponent );

Expand Down
3 changes: 3 additions & 0 deletions wrapping/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
itk_wrap_module(WebAssemblyInterface)
itk_auto_load_submodules()
itk_end_wrap_module()
2 changes: 2 additions & 0 deletions wrapping/itkWASMImageIO.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
itk_wrap_simple_class("itk::WASMImageIO" POINTER)
itk_wrap_simple_class("itk::WASMImageIOFactory" POINTER)
2 changes: 2 additions & 0 deletions wrapping/itkWASMMeshIO.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
itk_wrap_simple_class("itk::WASMMeshIO" POINTER)
itk_wrap_simple_class("itk::WASMMeshIOFactory" POINTER)

0 comments on commit a0e6705

Please sign in to comment.