<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set of DICOM images.<br></div><div><br>I've compile VTK with the vtkDICOM module enabled and followed the example from the pdf found on the github repository (<a href="http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf">http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf</a>).<br><div><br></div><br>The image data is created like this :<br><br>    auto  img = vtkSmartPointer < vtkImageData >::New();<br>    img->SetOrigin(0, 0, 0);<br>    img->SetDimensions(1024, 1024, numlayer);<br>    img->SetSpacing(1, 1, 1);<br>    img->AllocateScalars(VTK_UNSIGNED_SHORT, 1);<br><br></div>and the data filled like this : <br><br>           for (int n = 0; x < numlayer; n++) {<br>                for (int x = 0; x < 1024; x++) {<br>                    for (int y = 0; y < 1024; y++) {<br>                        char* pixel = static_cast<char*>(img->GetScalarPointer(x, y, n));<br>                        pixel[0] = values[x][y];<br>                    }<br></div><div><br></div>I can load the converted result with paraview without problems.<br>But with 3D Slicer, I can just load the first file of the serie and it display a blank image.<br><br></div>What do I have to do to be able to load the images with both application ?<br></div><div><br>Thanks, <br><br></div>Eddy<br><div><br></div></div>