I am working on doing segmentation on medical images using neural networks and was trying to see if setting windowing to right levels helps in training the net to get better results. I was able to implement the lookup table to colorise the image but when I try to convert it to nifty image or try to get the numpy array of the stack I get the same grayscale version of the image.
Can you please tell me if it possible to get the colorised medical image from the vtk pipe line that can be sent to the neuralnet as a 3 channel single slice or a 4D matrix with the color channel as one of the index of the matrix
David Gobbi’s Response was
" It would help if you could provide a clear description of which VTK classes and settings you are using in your pipeline.
In general, my recommendation is as follows:
build a vtkLookupTable, and set the Range of the lookup table the lower and upper limits of your desired window
connect the lookup table to vtkImageMapToColors, call SetOutputFormatToRGB()
pass the image through vtkImageMapToColors"