<div>I am trying to transfer DICOM files read in ITK to VTK for a 3D rendering.</div><div><br></div>I have a vector of ImageType::Pointer in ITK:<div><pre style="font-family: Consolas; font-size: 13px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; background-position: initial initial; background-repeat: initial initial; ">
<span style="color: blue; ">typedef</span>        itk::OrientedImage<<span style="color:blue;">signed</span> <span style="color:blue;">short</span>, 3> ImageType;</pre><pre style="font-family:Consolas;font-size:13;color:black;background:white;">
<pre style="font-family:Consolas;font-size:13;color:black;background:white;"><span style="color:blue;">typedef</span> std::vector<ImageType::Pointer> ImageArray;
</pre></pre><div><br></div><div>Each element in this vector (ImageArray) contains a slice of DICOM read in 'signed short' for certain reasons beyond my control.</div></div><div>I would like to transfer this ImageArray to ImageToVTKImageFilter as follows:</div>
<div><br></div><div><pre style="font-family:Consolas;font-size:13;color:black;background:white;"><span style="color:blue;">typedef</span> itk::ImageToVTKImageFilter< ImageType> itkVtkConverter;</pre></div><div><pre style="font-family:Consolas;font-size:13;color:black;background:white;">
itkVtkConverter::Pointer conv;
</pre><pre style="font-family:Consolas;font-size:13;color:black;background:white;"><span class="Apple-style-span" style="font-family: monospace; font-size: small; "><pre style="font-family: Consolas; font-size: 13px; color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; ">
// QUESTION: HOW TO SUPPLY THE VECTOR ImageArray here?</pre></span></pre><pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; background-position: initial initial; background-repeat: initial initial; ">
<pre style="font-family: Consolas; font-size: 13px; color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; ">conv->SetInput(_**_WHAT_GOES_HERE?_**_);
conv->Update();</pre><pre style="font-size: 13px; color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; ">as the data is signed short, I will need to convert it to 'unsigned short' that I can achieve as follows:</span></pre>
<pre style="font-size: 13px; color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><pre style="font-family:Consolas;font-size:13;color:black;background:white;">
vtkSmartPointer<vtkImageCast> dataCast = vtkSmartPointer<vtkImageCast>::New();
dataCast->SetInput(conv->GetOutput());
dataCast->SetOutputScalarTypeToUnsignedShort();
dataCast->Update();</pre></font></pre><pre style="font-size: 13px; color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; ">
<font class="Apple-style-span" face="arial, helvetica, sans-serif">finally forwarding this to the vtkVolumeRayCastMapper:</font></pre><pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; ">
<pre style="font-family: Consolas; font-size: 13px; color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; background-position: initial initial; background-repeat: initial initial; ">
volumeMapper->SetInput(dataCast->GetOutput());
</pre><pre style="color: black; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></pre><pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" face="arial, helvetica, sans-serif">How to supply the vector ImageArray to ImageToVTKImageFilter?<span class="Apple-style-span" style="color: black; ">
</span></font></pre><pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></pre><pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" face="arial, helvetica, sans-serif">best regards,</font></pre>
<pre style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" face="arial, helvetica, sans-serif">Divya</font></pre>
<div style="color: black; font-family: Consolas; font-size: 13px; "><br></div></pre></pre></div>