[Insight-developers] BinaryImageToShapeLabelMapFilter

elhadj meljane elhadj.meljane at gmail.com
Wed Jan 8 09:44:09 EST 2014


I used 2D images 800x600....

Thanks

On Wed, Jan 8, 2014 at 8:19 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> How large is the volume you are processing.
>
> Bill
>
>
> On Wed, Jan 8, 2014 at 8:14 AM, elhadj meljane <elhadj.meljane at gmail.com> wrote:
>> Hi Bill,
>> Here's the code ...
>>
>>
>> typedef itk::ImageFileReader< ImageType > ReaderType;
>> ReaderType::Pointer reader = ReaderType::New();
>>  reader->SetFileName( argv[1] );
>>  try{
>>   reader->Update();
>>
>>  }
>>  catch (std::exception &e)
>>  {
>>   std::cerr << "Exception: " << e.what() << std::endl;
>>   return 1;
>>  }
>>  catch (...){
>>   std::cerr << "Unknown Exception!" << std::endl;
>>   throw;
>>  }
>>
>>
>>
>>  try{
>>   typedef itk::BinaryImageToShapeLabelMapFilter<ImageType>
>> BinaryImageToShapeLabelMapFilterType;
>>   BinaryImageToShapeLabelMapFilterType::Pointer
>> binaryImageToShapeLabelMapFilter =
>> BinaryImageToShapeLabelMapFilterType::New();
>>   binaryImageToShapeLabelMapFilter->SetInput(reader->GetOutput());
>>   binaryImageToShapeLabelMapFilter->Update();
>>  }
>>  catch (std::exception &e)
>>  {
>>   std::cerr << "Exception: " << e.what() << std::endl;
>>   return 1;
>>  }
>>  catch (...){
>>   std::cerr << "Unknown Exception!" << std::endl;
>>   throw;
>>  }
>>
>> On Tue, Jan 7, 2014 at 8:39 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>> Please post your code.
>>>
>>>
>>> On Tue, Jan 7, 2014 at 7:33 PM, elhadj meljane <elhadj.meljane at gmail.com> wrote:
>>>> Hi all,
>>>> I have a problem with the filter BinaryImageToShapeLabelMapFilter. I
>>>> used the example code:
>>>>
>>>>  http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter
>>>>
>>>> with  a binary image file  as input instead of the created image
>>>> inside the example.
>>>>  Around this code I added  handling exception try/catch: catch
>>>> (std::exception &e) and catch (...). The program works  sometimes but
>>>> and crashes at other sometimes without catching  any exception. I got
>>>> a box with the  message "A problem caused the program to stop working
>>>> correctly...", when I click on Debug, in MS Visual Studio, it
>>>> indicates an unhandled exception in the  function "static void *
>>>> allocate(vcl_size_t n) ( file  vnl_alloc.h  )".
>>>>
>>>> I would appreciate your comments on this issue.
>>>>
>>>> Thanks,
>>>> Haj
>>>> _______________________________________________
>>>> 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://kitware.com/products/protraining.php
>>>>
>>>> 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-developers
>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com


More information about the Insight-developers mailing list