<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&lt;<span style="color:blue;">signed</span> <span style="color:blue;">short</span>, 3&gt; 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&lt;ImageType::Pointer&gt; ImageArray;
</pre></pre><div><br></div><div>Each element in this vector (ImageArray) contains a slice of DICOM read in &#39;signed short&#39; 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&lt; ImageType&gt; 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-&gt;SetInput(_**_WHAT_GOES_HERE?_**_);
conv-&gt;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 &#39;unsigned short&#39; 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&lt;vtkImageCast&gt; dataCast = vtkSmartPointer&lt;vtkImageCast&gt;::New();
dataCast-&gt;SetInput(conv-&gt;GetOutput());
dataCast-&gt;SetOutputScalarTypeToUnsignedShort();
dataCast-&gt;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-&gt;SetInput(dataCast-&gt;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>