Please keep on list....<div><br></div><div>What version of ITK? And what happens if you define it as a .cxx rather than .cu?<br><br><div class="gmail_quote">On Tue, Oct 23, 2012 at 9:17 AM, Gabriel Santiago <span dir="ltr"><<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sure!<div><br></div><div>In my <font color="#3333ff"><a href="http://main.cu" target="_blank">main.cu</a></font> file:</div>
<div><br></div><div>#include <iostream></div><div>#include <string></div><div><span style><font color="#000099">#include "itkImageFileReader.h"</font></span></div>
<div><br></div><div>using std::cout;</div><div>using std::string;</div><div><br></div><div>int main(void){</div><div><br></div><div><font color="#ff0000">string filename = "dicom_file.dcm";</font></div><div><font color="#ff0000"><br>
</font></div><div><font color="#ff0000">typedef signed int InputPixelType;</font></div><div><font color="#ff0000">typedef itk::Image<InputPixelType, 3> InputImageType;</font></div><div><font color="#ff0000">typedef itk::ImageFileReader<InputImageType> ReaderType;</font></div>
<div><font color="#ff0000">ReaderType::Pointer reader = ReaderType::New();</font></div><div><font color="#ff0000">reader->SetFileName(filename.c_str());</font></div><div><font color="#ff0000"><br></font></div><div><font color="#ff0000">return 0;</font></div>
<div><br></div><div>}</div><div><br></div><div>My CMakeLists.txt file conatins:</div><div><br></div><div><div><font color="#006600">PROJECT( PROJECT_NAME )</font></div><div><font color="#006600">CMAKE_MINIMUM_REQUIRED(VERSION 2.8)</font></div>
<div><font color="#006600">FIND_PACKAGE ( ITK REQUIRED )</font></div><div><font color="#006600">FIND_PACKAGE(CUDA)</font></div><div><font color="#006600">INCLUDE(FindCUDA)</font></div><div><font color="#006600">IF ( ITK_FOUND )</font></div>
<div><font color="#006600">INCLUDE( ${ITK_USE_FILE} )</font></div><div><font color="#006600">ENDIF( ITK_FOUND )</font></div><div><font color="#006600">CUDA_ADD_EXECUTABLE( PROJECT_NAME <a href="http://main.cu" target="_blank">main.cu</a> )</font></div>
<div><font color="#006600">TARGET_LINK_LIBRARIES ( PROJECT_NAME ITKCommon ITKIO)</font></div><div class="gmail_quote"><br></div><div class="gmail_quote">Thank you for your reply,</div><div><div class="h5"><div class="gmail_quote">
<br></div><div class="gmail_quote">
On 23 October 2012 11:08, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Gabriel,<div><br></div><div>Can you provide a small compilable example to illustrate your problem?</div><div><br></div><div>Bill<br><br><div class="gmail_quote"><div><div>On Mon, Oct 22, 2012 at 7:35 AM, Gabriel Santiago <span dir="ltr"><<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi guys,<br><br>I am trying to read a DICOM file using ITK. I am doing exactly what is described in the ITK User Guide but I am getting some weird error messages. Here they are:<br>
<br><span style="color:rgb(0,0,153)"><b> overriding ‘itk::ImageBase<VImageDimension>::Pointer itk::ImageBase<VImageDimension>::CreateAnother() const [with unsigned int VImageDimension = 3u, itk::ImageBase<VImageDimension>::Pointer = itk::SmartPointer<itk::ImageBase<3u> >]’<br>
<br>overriding ‘virtual itk::LightObject::Pointer itk::Object::CreateAnother() const’ <br><br>invalid covariant return type for ‘itk::ImageBase<VImageDimension>::Pointer itk::ImageBase<VImageDimension>::CreateAnother() const [with unsigned int VImageDimension = 3u, itk::ImageBase<VImageDimension>::Pointer = itk::SmartPointer<itk::ImageBase<3u> >]’<br>
<br>invalid covariant return type for ‘itk::LightObject::Pointer itk::Image<TPixel, VImageDimension>::CreateAnother() const [with TPixel = int, unsigned int VImageDimension = 3u, itk::LightObject::Pointer = itk::SmartPointer<itk::LightObject>]’</b></span><br>
<br>All of them are not in my code. Can anyone here, please tell me what is going on?<br><br>Thank you all,<span><font color="#888888"><br clear="all"><br>-- <br>Gabriel Santiago<br><br>~"As long as I live so long do I learn"~<div>
Ramakhrishna</div>
<br>
</font></span><br></div></div><div>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Gabriel Santiago<br><br><br>~"As long as I live so long do I learn"~<div>Ramakhrishna</div><br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div>