SimVascular / vascularmodel

Other
1 stars 2 forks source link

Some VTP files not compatible with SimVascular #7

Closed natalia-rubio closed 6 months ago

natalia-rubio commented 7 months ago

Description

VTP files in the Models and Meshes folders of models 0042_H_ABAO_AAA and 0023_H_AO_MFS crashes during certain operations: importing the model VTP file, creating 1D simulations, etc. This is most likely due to the VTP files containing int64 data types instead of int32. (Reported by Dave.)

Reproduction

Import the VTP file using "import solid model" in the SimVascular GUI.

Expected behavior

SimVascular should be able to read in the model without crashing.

Additional context

No response

Code of Conduct

natalia-rubio commented 7 months ago

I changed all the data in the 0042_H_ABAO_AAA VTP files to be int32, and I think it should work now. @ktbolt If you can confirm that 0042_H_ABAO_AAA is good now, I'll do the same procedure for 0023_H_AO_MFS. In the future we can make this part of the upload process.

ktbolt commented 7 months ago

@natalia-rubio I had a look at 0042_H_ABAO_AAA. ModelFaceID, etc. look good but the cell normals have also been converted to Int32

<DataArray type="Int32" Name="Normals

should be

<DataArray type="Float32" Name="Normals" 

This causes the model surface to appear black and will mess up some SV algorithms I bet.

natalia-rubio commented 7 months ago

Got it, thanks! I'll fix that. Is there any other field that shouldn't be int32?

ktbolt commented 7 months ago

I think all Int64 DataArray types can be converted to Int32 but it seems that centerlines.vtp file have both Int64 and Int32 DataArray fields. Why?

You really only need to convert GlobalNodeId, ModelFaceID, GlobalElementID Int64 DataArray I think, these guys are causing SV to crash.

natalia-rubio commented 7 months ago

Thanks, got it! Does it seem ok now?

ktbolt commented 7 months ago

Looks good!

natalia-rubio commented 6 months ago

Repeated for 0023_H_AO_MFS.