<html><head></head><body bgcolor="#FFFFFF"><div>Hi Jose,</div><div><br></div><div>Thank you so much for your great help!!!</div><div>Yes, maybe the problem is the data...because I also have tried the set directory name and it doesn't work..</div><div><br></div><div>So, if the DOCIM data is invalid...can I use the nifty data (.nii) ? Actually my final goal is to render the nii file in real time with tesla...Could I directly read in nii file? Or I have to convert them to other format? </div><div><br></div><div>Thank you so mug for your great help!!!</div><div>Crystal<br><br><br></div><div><br>On Oct 27, 2012, at 5:34, Jose Miguel Espadero <<a href="mailto:josemiguel.espadero@urjc.es">josemiguel.espadero@urjc.es</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><br>Hi Crystal,<br><br>Maybe the problem is that you are trying to see a single image,<br>and you need several to create a volume.<br><br>I have been able to make your code work by just changing the reader to:<br><br>dicomReader = vtk.vtkDICOMImageReader()<br>
#dicomReader.SetDirectoryName('/home-nfs/local/VANDERBILT/lib12/pythonGPUdata/55.dcm')<br>dicomReader.SetDirectoryName('dcmDir')<br>dicomReader.Update()<br>dataSpacing = dicomReader.GetDataSpacing()<br>dimensions = dicomReader.GetOutput().GetDimensions()<br>
print dimensions<br><br>The contents of dcmDir are the images in the file:<br><a href="http://www.vtk.org/Wiki/File:VTK_Examples_StandardFormats_Input_DicomTestImages.zip">http://www.vtk.org/Wiki/File:VTK_Examples_StandardFormats_Input_DicomTestImages.zip</a><br>
<br>I have try to duplicate your image (55.dcm) several times, but it does not work. Maybe the <br>problem is in your data.<br><br>Hope this helps.<br><br>
</div></blockquote></body></html>