[Insight-users] Deformation Registration File Type

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 1 18:28:09 EDT 2010


Hi Stephen,

My mistake.

PNG is not suitable here, because the images in question
have "float" pixel type.

It is better, therefore, to use "MetaImage" as a fileformat,
by simply using .mhd as the filename extension.

We have made these changes now in this file in the
CVS repository:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/Registration/DeformableRegistration1.cxx?root=Insight&r1=1.33&r2=1.34&sortby=date


We also added try/catch blocks, so that the next time
that there is an IO failure, you will get a more informative
message.


Finally,
we also modified the use of .hdr in the
FEMRegistration filter itself:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Algorithms/itkFEMRegistrationFilter.txx?root=Insight&r1=1.59&r2=1.60&sortby=date


            Regards,


                   Luis


---------------------------------------------------
On Tue, Mar 30, 2010 at 12:16 PM, Stephen Yip <stephen.fyip1 at gmail.com> wrote:
> Hi Luis,
>
> I changed "hdr" to "png". But then I got the following error message.
>
> "This application has requested the Runtime to terminate it in an unusual
> way. Please contact the application's support team for more information."
>
> stephen
>
> On Sat, Mar 27, 2010 at 12:36 PM, Luis Ibanez <luis.ibanez at kitware.com>
> wrote:
>>
>> Hi Stephen,
>>
>> Please read the source code of the example.
>>
>> You will find the ".hdr" extensions in lines:
>>
>>
>> 269:     std::string ofn="fixed.hdr";
>>
>> 274:     ofn="moving.hdr";
>>
>>
>> Simply replace this extensions with the ones
>> that you want to use.
>>
>> ------
>>
>> Being able to read the source code, and
>> being allowed to modify it, is one of the
>> essential reasons for the superiority of
>> Open Source software.
>>
>>
>>       Take advantage of it.      :-)
>>
>>
>>
>>   Regards,
>>
>>
>>
>>         Luis
>>
>>
>>
>> ------------------------------------------------------------
>> On Fri, Mar 26, 2010 at 10:39 AM, Stephen Yip <stephen.fyip1 at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I just played with the DeformableRegistration1.cxx example. It worked.
>> > But I
>> > got hdr files as my outputs. I am wondering how I can change the file
>> > types
>> > from hdr to something else.
>> >
>> > Thank you
>> > Stephen
>> >
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.html
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>> >
>
>


More information about the Insight-users mailing list