Exporting labelmap in raw format

Hello all,
I’m trying to export a binary labelmap in raw format.
I have a segmentation, I press “Export visible segment to binary labelmap”.
Then I click on the new labelmap and export to file, saving it as raw. But then I get an error. The same if I try .bmp. It works with tif and vtk. I report a screenshot of the error.
How can I solve? I tried in many different ways.

Thanks!

You can save in .nhdr format with compression disabled. That way you don’t lose any information, just the image header is stored in a separate file (*.seg.nhdr is the header file, *.raw is the raw voxel file).

Note that saving as .raw format makes the data unusable, as you need at least the image dimensions, origin, spacing, and axis directions to be able to reconstruct the image in 3D space. What is the motivation for saving as .raw file without an image header?

Hello,
My ultimate goal is to create a voxel file of the patient to be used in an EM solver. The raw file will be associated with a voxel material description file containing the dielectric properties associated to the different tissues (identified by the index assigned in the raw file to the voxels belonging to each segmented tissue).
Let me know if I’m not clear.

Thank you again!

What is that solver? Are you sure that it cannot read the properties from any of the standard 3D volume file formats?

If the solver indeed can only accept a raw file then I would recommend to request from the developers to add support for a standard 3D image file format (NRRD, MetaIO, or NIFTI). Ability to load an array from a standard file format would simplify the life of users and would reduce the user support effort of the developers (as it would be straightforward to import the material properties). Until they implement this, using the .nhdr format can be a reasonable workaround.

Hello,
the idea is to use it with CST and COMSOL.
But thank you for your answer. I didn’t think about the .nhdr format.
I can use the .raw file to build my .vox.
I hope to be on the right path.

Thanks!