Unhandled Rejection (TypeError): Cannot read property 'getRange' of null
See original GitHub issuehello.
I extracted the vti from the dicom file series using the following Python code:
def vtkImageToNumPy(image, pixelDims):
imageData = reader.GetOutput()
pointData = image.GetPointData()
arrayData = pointData.GetArray(0)
ArrayDicom = numpy_support.vtk_to_numpy(arrayData)
ArrayDicom = ArrayDicom.reshape(pixelDims, order='F')
return ArrayDicom
dicomFolder = "./lung_imgs"
reader = vtk.vtkDICOMImageReader()
reader.SetDirectoryName(dicomFolder)
reader.Update()
# Load dimensions using `GetDataExtent`
my_extent = reader.GetDataExtent()
ConstPixelDims = [my_extent[1]-my_extent[0]+1, my_extent[3]-my_extent[2]+1, my_extent[5]-my_extent[4]+1]
# Load spacing values
ConstPixelSpacing = reader.GetPixelSpacing()
dicom_array = vtkImageToNumPy(reader.GetOutput(), ConstPixelDims)
from pyevtk.hl import imageToVTK
imageToVTK("./lungResult",cellData={"ArrayDicom" : dicom_array})
So I tried to implement volume rendering. However, the following error occurred:

So I tried to compare the implemented vti file with the unimplemented vti file through the para view. There were the following differences:
[unimplemented]

[implemented]

I want to find the difference and solution between the above pictures. I would like to implement volume rendering using ArrayDicom.
I would really appreciate your reply.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12
Top Results From Across the Web
Cannot read property 'getRange' of null [duplicate]
The error Cannot read property 'getRange' of null means that the script cannot find the specified range; The most common reason of this ......
Read more >Cannot read property "getRange" from null. (line 3, file "Code"
I am getting a Cannot read property "getRange" from null. (line3, file "Code"). var emailRange = SpreadsheetApp. getActiveSpreadsheet().
Read more >Cannot read property 'getRange' of null (line 106, file "Code")
Whenever I try to run this code it gives me the following error: TypeError: Cannot read property 'getRange' of null (line 106, file...
Read more >ERROR TypeError: Cannot read property title of undefined
Solved C# Empty String if null System.NullReferenceException: Object reference not set to instance. CodeDocu Developer C# Asp Net Angular.
Read more >Fix Cannot Set Property of Null Error in JavaScript - YouTube
Check us out at https://www.skillforge.com The " cannot set property of null " error is a very common JavaScript issue that you may...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I thing VolumeRendering expect Scalars unless you specify which array you want to look at.
Anyway a way to fix that is to locally set that array as scalars
Probably because you don’t have Scalars (active array). You can try
imageData.getPointData().getArray(0)instead ofgetScalars().