<div dir="ltr">Have you tried without ITKImageIO? I think png is present by default anyway. I would also check if you are using the same configuration between ITK and your code (shared vs static libraries).<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 6:17 PM Isuru Suranga Wijesinghe <<a href="mailto:isurusuranga.wijesinghe@gmail.com">isurusuranga.wijesinghe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><b>I have tried to change my CMake configuration as in the given asnwers but I have got an error as below.</b><br><br><i>Severity        Code    Description     Project File    Line    Suppression State<br>Error        LNK2001 unresolved external symbol "void __cdecl itk::JPEG2000ImageIOFactoryRegister__Private(void)" (?JPEG2000ImageIOFactoryRegister__Private@itk@@YAXXZ)    FirstReconstruction     D:\RTKExample\Build\FirstReconstruction.obj     1       </i><br><br><b>For your further reference I have copied my CMKaeLsits file as well.</b><br><br><i>cmake_minimum_required(VERSION 3.9.5 FATAL_ERROR)<br><br># This project is designed to be built outside the RTK source tree.<br>project(FirstReconstruction)<br><br># Find ITK with RTK<br>find_package(ITK REQUIRED COMPONENTS RTK ITKImageIO)<br><br>include(${ITK_USE_FILE})<br><br># Executable(s)<br>add_executable(FirstReconstruction FirstReconstruction.cpp )<br>#target_link_libraries(FirstReconstruction ${RTK_LIBRARIES})<br>target_link_libraries(FirstReconstruction ${ITK_LIBRARIES})</i><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 4:03 PM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>Can you check <a href="https://discourse.itk.org/t/is-png-no-longer-supported/2893/16" target="_blank">this thread</a>? A similar problem was solved there. Note that I don't think that PNG can support float types.</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 4:59 PM Isuru Suranga Wijesinghe <<a href="mailto:isurusuranga.wijesinghe@gmail.com" target="_blank">isurusuranga.wijesinghe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The problem is in the RTK I think. I was able to successfully save the output image as the .png extension with an ITK eample. <div>I just checked  with CMake GUI and it doesn't contain a such module.  Please see the attachment. Any alternative approach is there ?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 3:37 PM Andreas Andersen <<a href="mailto:andreasga22@gmail.com" target="_blank">andreasga22@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>It actually tells you the problem, you set the suffix of an unsupported type.</div><div dir="auto">However, it doesn't tell you that ITK can support PNG if you configure and compile with the CMake option Module_ITKIOPNG=ON (unless they changed it)</div><div dir="auto">I think the type should automatically register after a successful rebuild.</div><div dir="auto"><br></div><div dir="auto">/Andreas<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, 22 Apr 2020, 16:10 Isuru Suranga Wijesinghe, <<a href="mailto:isurusuranga.wijesinghe@gmail.com" target="_blank">isurusuranga.wijesinghe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div>I have tried to save the out image as .png and it gave an error as below.<br><br>itk::ImageFileWriterException (0000003E08EFFCC0)   Location: "unknown"<br>File: D:\ITK\Source\Modules\IO\ImageBase\include\itkImageFileWriter.hxx<br>Line: 128   Description:  Could not create IO object for writing file<br>E:/DRRGeneratedDataset/one_CT/DRR_RTK/first.png    <br>Tried to create one of the following:<br>GDCMImageIO<br>MetaImageIO<br>TIFFImageIO<br>You probably failed to set a file suffix, or  set the suffix to an unsupported type.<br><br>And when changing the output extension to .mha it gives below error.<br>'FirstReconstruction.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. <br>Exception thrown at 0x00007FF68D387919 in FirstReconstruction.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.<br><br>I have attached the source code (.cpp) file for your further reference. Please let me know if I have done any mistake.<br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 4:43 PM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" rel="noreferrer" target="_blank">simon.rit@creatis.insa-lyon.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Projection is centered on point (0,0,0) mm in your input (PhaseImage_01.mha) (as described in the doc). Check where this point is in your input. If it's outside, then you need to modify its origin (in the ITK sense, check ITK doc).<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 5:36 PM Isuru Suranga Wijesinghe <<a href="mailto:isurusuranga.wijesinghe@gmail.com" rel="noreferrer" target="_blank">isurusuranga.wijesinghe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div>I have built rtkforwardprojections code. And pass the appropriate parameters to the generated exe from the command line as below.<br>But there is nothing in the output location. I have attached herewith my geomtry.xml as well.<div><br>D:/RTK/Build/bin/Release>rtkforwardprojections -g D:/geomtry.xml -i D:\\Subject_01\\CT\\PhaseImage_01.mha -o D:/_rtk_output.png<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 20, 2020 at 8:45 PM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" rel="noreferrer" target="_blank">simon.rit@creatis.insa-lyon.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>Look at the <a href="http://www.openrtk.org/Doxygen/DocGeo3D.html" rel="noreferrer" target="_blank">doc on the geometry file</a> and <a href="https://github.com/SimonRit/RTK/tree/master/applications/rtksimulatedgeometry" rel="noreferrer" target="_blank">rtksimulatedgeometry</a> for creating one file. <a href="http://www.openrtk.org/Doxygen/classrtk_1_1ThreeDCircularProjectionGeometry.html#a39d6a67147cac1f2b5d75f5958a48f9a" rel="noreferrer" target="_blank">AddProjection</a> takes several parameters. Given your scheme, it should look like</div><div>AddProjection(1000, 1536, angle, +/-190 etc)</div><div>It looks like an Elekta geometry given the distances, check the example <a href="http://wiki.openrtk.org/index.php/RTK/Examples/ElektaReconstruction" rel="noreferrer" target="_blank">here</a> if you can get access to the database.</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 20, 2020 at 9:31 PM Isuru Suranga Wijesinghe <<a href="mailto:isurusuranga.wijesinghe@gmail.com" rel="noreferrer" target="_blank">isurusuranga.wijesinghe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I'm currently looking rtkforwardprojections example [1] to generate DRR images from 3D-CT volumes. My question is  how can I set custom geometric configurations as in the sample attached image ? </div><div><br></div><div>Can you please help with a relevant example of this. ?<br></div><div><br></div><div>[1] <a href="https://github.com/SimonRit/RTK/blob/b32cffdc6f9d7a432c50023c370ed996a7985b69/applications/rtkforwardprojections/rtkforwardprojections.cxx" rel="noreferrer" target="_blank">https://github.com/SimonRit/RTK/blob/b32cffdc6f9d7a432c50023c370ed996a7985b69/applications/rtkforwardprojections/rtkforwardprojections.cxx</a></div><div><br></div><div><div>Thanks and Best Regards,</div><div>Isuru</div></div></div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" rel="noreferrer" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" rel="noreferrer" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>