File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ private class DICOMSliceFile
33
33
private IEnumerable < string > fileCandidates ;
34
34
private string datasetName ;
35
35
36
+ private int iFallbackLoc = 0 ;
37
+
36
38
public DICOMImporter ( IEnumerable < string > files , string name = "DICOM_Dataset" )
37
39
{
38
40
this . fileCandidates = files ;
@@ -162,8 +164,9 @@ private DICOMSliceFile ReadDICOMFile(string filePath)
162
164
}
163
165
else
164
166
{
165
- Debug . LogError ( $ "Missing location/position tag in file: { filePath } .\n The file will not be imported") ;
166
- return null ;
167
+ Debug . LogError ( $ "Missing location/position tag in file: { filePath } .\n The file will not be imported correctly.") ;
168
+ // Fallback: use counter as location
169
+ slice . location = ( float ) iFallbackLoc ++ ;
167
170
}
168
171
169
172
// Read intercept
You can’t perform that action at this time.
0 commit comments