[Rtk-users] DRR image generation from 3D CT

Isuru Suranga Wijesinghe isurusuranga.wijesinghe at gmail.com
Wed Apr 22 12:16:42 EDT 2020


*I have tried to change my CMake configuration as in the given asnwers but
I have got an error as below.*


*Severity Code Description Project File Line Suppression StateError LNK2001
unresolved external symbol "void __cdecl
itk::JPEG2000ImageIOFactoryRegister__Private(void)"
(?JPEG2000ImageIOFactoryRegister__Private at itk@@YAXXZ) FirstReconstruction
D:\RTKExample\Build\FirstReconstruction.obj 1 *

*For your further reference I have copied my CMKaeLsits file as well.*














*cmake_minimum_required(VERSION 3.9.5 FATAL_ERROR)# This project is
designed to be built outside the RTK source
tree.project(FirstReconstruction)# Find ITK with RTKfind_package(ITK
REQUIRED COMPONENTS RTK ITKImageIO)include(${ITK_USE_FILE})#
Executable(s)add_executable(FirstReconstruction FirstReconstruction.cpp
)#target_link_libraries(FirstReconstruction
${RTK_LIBRARIES})target_link_libraries(FirstReconstruction
${ITK_LIBRARIES})*

On Wed, Apr 22, 2020 at 4:03 PM Simon Rit <simon.rit at creatis.insa-lyon.fr>
wrote:

> Hi,
> Can you check this thread
> <https://discourse.itk.org/t/is-png-no-longer-supported/2893/16>? A
> similar problem was solved there. Note that I don't think that PNG can
> support float types.
> Simon
>
> On Wed, Apr 22, 2020 at 4:59 PM Isuru Suranga Wijesinghe <
> isurusuranga.wijesinghe at gmail.com> wrote:
>
>> 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.
>> I just checked  with CMake GUI and it doesn't contain a such module.
>> Please see the attachment. Any alternative approach is there ?
>>
>> On Wed, Apr 22, 2020 at 3:37 PM Andreas Andersen <andreasga22 at gmail.com>
>> wrote:
>>
>>> It actually tells you the problem, you set the suffix of an unsupported
>>> type.
>>> 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)
>>> I think the type should automatically register after a successful
>>> rebuild.
>>>
>>> /Andreas
>>>
>>> On Wed, 22 Apr 2020, 16:10 Isuru Suranga Wijesinghe, <
>>> isurusuranga.wijesinghe at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have tried to save the out image as .png and it gave an error as
>>>> below.
>>>>
>>>> itk::ImageFileWriterException (0000003E08EFFCC0)   Location: "unknown"
>>>> File: D:\ITK\Source\Modules\IO\ImageBase\include\itkImageFileWriter.hxx
>>>> Line: 128   Description:  Could not create IO object for writing file
>>>> E:/DRRGeneratedDataset/one_CT/DRR_RTK/first.png
>>>> Tried to create one of the following:
>>>> GDCMImageIO
>>>> MetaImageIO
>>>> TIFFImageIO
>>>> You probably failed to set a file suffix, or  set the suffix to an
>>>> unsupported type.
>>>>
>>>> And when changing the output extension to .mha it gives below error.
>>>> 'FirstReconstruction.exe' (Win32): Loaded
>>>> 'C:\Windows\System32\kernel.appcore.dll'.
>>>> Exception thrown at 0x00007FF68D387919 in FirstReconstruction.exe:
>>>> 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
>>>>
>>>> I have attached the source code (.cpp) file for your further reference.
>>>> Please let me know if I have done any mistake.
>>>>
>>>>
>>>> On Tue, Apr 21, 2020 at 4:43 PM Simon Rit <
>>>> simon.rit at creatis.insa-lyon.fr> wrote:
>>>>
>>>>> 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).
>>>>>
>>>>> On Tue, Apr 21, 2020 at 5:36 PM Isuru Suranga Wijesinghe <
>>>>> isurusuranga.wijesinghe at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have built rtkforwardprojections code. And pass the appropriate
>>>>>> parameters to the generated exe from the command line as below.
>>>>>> But there is nothing in the output location. I have attached herewith
>>>>>> my geomtry.xml as well.
>>>>>>
>>>>>> D:/RTK/Build/bin/Release>rtkforwardprojections -g D:/geomtry.xml -i
>>>>>> D:\\Subject_01\\CT\\PhaseImage_01.mha -o D:/_rtk_output.png
>>>>>>
>>>>>> On Mon, Apr 20, 2020 at 8:45 PM Simon Rit <
>>>>>> simon.rit at creatis.insa-lyon.fr> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> Look at the doc on the geometry file
>>>>>>> <http://www.openrtk.org/Doxygen/DocGeo3D.html> and
>>>>>>> rtksimulatedgeometry
>>>>>>> <https://github.com/SimonRit/RTK/tree/master/applications/rtksimulatedgeometry>
>>>>>>> for creating one file. AddProjection
>>>>>>> <http://www.openrtk.org/Doxygen/classrtk_1_1ThreeDCircularProjectionGeometry.html#a39d6a67147cac1f2b5d75f5958a48f9a>
>>>>>>> takes several parameters. Given your scheme, it should look like
>>>>>>> AddProjection(1000, 1536, angle, +/-190 etc)
>>>>>>> It looks like an Elekta geometry given the distances, check the
>>>>>>> example here
>>>>>>> <http://wiki.openrtk.org/index.php/RTK/Examples/ElektaReconstruction>
>>>>>>> if you can get access to the database.
>>>>>>> Simon
>>>>>>>
>>>>>>> On Mon, Apr 20, 2020 at 9:31 PM Isuru Suranga Wijesinghe <
>>>>>>> isurusuranga.wijesinghe at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> 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 ?
>>>>>>>>
>>>>>>>> Can you please help with a relevant example of this. ?
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> https://github.com/SimonRit/RTK/blob/b32cffdc6f9d7a432c50023c370ed996a7985b69/applications/rtkforwardprojections/rtkforwardprojections.cxx
>>>>>>>>
>>>>>>>> Thanks and Best Regards,
>>>>>>>> Isuru
>>>>>>>> _______________________________________________
>>>>>>>> Rtk-users mailing list
>>>>>>>> Rtk-users at public.kitware.com
>>>>>>>> https://public.kitware.com/mailman/listinfo/rtk-users
>>>>>>>>
>>>>>>> _______________________________________________
>>>> Rtk-users mailing list
>>>> Rtk-users at public.kitware.com
>>>> https://public.kitware.com/mailman/listinfo/rtk-users
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20200422/2f4c369e/attachment.html>


More information about the Rtk-users mailing list