[Insight-users] How to turn Off sorting by size in RelabelComponentFilter

Arpit Agrawal arpit392 at gmail.com
Tue Aug 10 00:20:45 EDT 2010


hello guyz,
i have a doubt...as far as i know even ConnectedComponentFilter does not
produce labels in raster order...it also labels the components according to
the size and the relabel image filter assigns only just a predefined
specific color according the label...

plz tell me if i m wrong...

On Tue, Aug 10, 2010 at 5:10 AM, Richard Beare <richard.beare at gmail.com>wrote:

> The default labeling behavior provided in the
> itk::ConnectedComponentImageFilter does this. If you are starting with
> a binary image and want to label separate components then
> ConnectedComponentImageFilter will produce labels in raster order. If
> you already have a labelled image then different strategies might be
> needed, depending on how it was produced and what the characteristics
> are (i.e whether labelled regions touch.)
>
> On Tue, Aug 10, 2010 at 8:45 AM, Emma Ryan <eryanvtk at yahoo.com> wrote:
> > Hello All,
> >
> >    By default the itk::RelabelComponentImageFilter  seems to be sorting
> the
> > labels by size. I would like the label to be number according to their
> > raster position. Is there a way to turn off the sorting ?
> >
> > Thank you,
> > Emma
> >
> > ________________________________
> > From: "insight-users-request at itk.org" <insight-users-request at itk.org>
> > To: insight-users at itk.org
> > Sent: Mon, August 9, 2010 12:42:15 PM
> > Subject: Insight-users Digest, Vol 76, Issue 24
> >
> > Send Insight-users mailing list submissions to
> >     insight-users at itk.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >     http://www.itk.org/mailman/listinfo/insight-users
> > or, via email, send a message with subject or body 'help' to
> >     insight-users-request at itk.org
> >
> > You can reach the person managing the list at
> >     insight-users-owner at itk.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Insight-users digest..."
> >
> >
> > Today's Topics:
> >
> >   1. Tcon Agenda Posted (Tuesday 1pm EST) (Luis Ibanez)
> >   2. Re: Tcon Agenda Posted (Tuesday 1pm EST) (Bradley Lowekamp)
> >   3. Re: [Insight-developers] Tcon Agenda Posted    (Tuesday 1pm EST)
> >       (Arnaud GELAS)
> >   4. itk::BilateralImageFilter extremely slow (Oleksandr Dzyubak)
> >   5. Re: Problem with passing images to functions (habibbaluwala2010)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 9 Aug 2010 14:35:09 -0400
> > From: Luis Ibanez <luis.ibanez at kitware.com>
> > Subject: [Insight-users] Tcon Agenda Posted (Tuesday 1pm EST)
> > To: itk <Insight-users at itk.org>,    Insight Developers
> >     <Insight-developers at itk.org>
> > Message-ID:
> >     <AANLkTi=OgJ1OyJRuRDOqY=t70iSYpWT1JAVZcj_5HC5Y at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > The Agenda for tomorrow's tcon has been posted at:
> >
> > http://www.itk.org/Wiki/Agenda%26Status_081010
> >
> > As discussed in the last tcon,
> > we are inverting the order of the agenda,
> > in order to address some topics for which
> > we have run out of time in previous calls.
> >
> > Please feel free to add any topics of your interest.
> >
> >
> >     Luis
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> > <
> http://www.itk.org/pipermail/insight-users/attachments/20100809/286a83b3/attachment-0001.htm
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Mon, 9 Aug 2010 15:06:45 -0400
> > From: Bradley Lowekamp <blowekamp at mail.nih.gov>
> > Subject: Re: [Insight-users] Tcon Agenda Posted (Tuesday 1pm EST)
> > To: Luis Ibanez <luis.ibanez at kitware.com>
> > Cc: itk <Insight-users at itk.org>,    Insight Developers
> >     <Insight-developers at itk.org>
> > Message-ID: <3640D14E-D614-41AA-BE09-5223002184CB at mail.nih.gov>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > Hello Luis,
> >
> > Looking over the agenda for tomorrow, I can't help but think  that the
> > Microscopy should be a break out t-con (unless I missed it, and this is a
> > summary). I have had experience with streaming and many related issues to
> > the large datasets complications, so I would like to participate in such
> a
> > break out.
> >
> > Perhaps the agenda item should just be to schedule such a meeting?
> >
> > Brad
> >
> > On Aug 9, 2010, at 2:35 PM, Luis Ibanez wrote:
> >
> >>
> >> The Agenda for tomorrow's tcon has been posted at:
> >>
> >> http://www.itk.org/Wiki/Agenda%26Status_081010
> >>
> >> As discussed in the last tcon,
> >> we are inverting the order of the agenda,
> >> in order to address some topics for which
> >> we have run out of time in previous calls.
> >>
> >> Please feel free to add any topics of your interest.
> >>
> >>
> >>    Luis
> >>
> >>
> >> <ATT00001..txt>
> >
> > ========================================================
> > Bradley Lowekamp
> > Lockheed Martin Contractor for
> > Office of High Performance Computing and Communications
> > National Library of Medicine
> > blowekamp at mail.nih.gov
> >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> > <
> http://www.itk.org/pipermail/insight-users/attachments/20100809/bd7b55cd/attachment-0001.htm
> >
> >
> > ------------------------------
> >
> > Message: 3
> > Date: Mon, 9 Aug 2010 15:16:54 -0400
> > From: Arnaud GELAS <arnaud_gelas at hms.harvard.edu>
> > Subject: Re: [Insight-users] [Insight-developers] Tcon Agenda Posted
> >     (Tuesday 1pm EST)
> > To: Bradley Lowekamp <blowekamp at mail.nih.gov>
> > Cc: itk <Insight-users at itk.org>,    Insight Developers
> >     <Insight-developers at itk.org>,    Luis Ibanez <
> luis.ibanez at kitware.com>,
> >     "Megason,    Sean" <Sean_Megason at hms.harvard.edu>
> > Message-ID: <4C605426.4080103 at hms.harvard.edu>
> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
> >
> >   Hi Brad,
> >
> > I think we should do both, first to present problems from the microscopy
> > community. At least everyone can understand some of the related problems
> > in terms of design. Then interested people and people that have ideas on
> > how to address these issues can then meet in another break out t-con.
> >
> > It seems to be important to discuss at least in the main t-conf:
> >
> >     * how to deal with time?
> >     * how to deal with channels? (Note that for one channel, the pixel
> >       type could be a scalar, vector or tensor)...
> >
> > Then we could discuss other details in the break out one...
> >
> > Arnaud
> >
> > On 08/09/2010 03:06 PM, Bradley Lowekamp wrote:
> >> Hello Luis,
> >>
> >> Looking over the agenda for tomorrow, I can't help but think  that the
> >> Microscopy should be a break out t-con (unless I missed it, and this
> >> is a summary). I have had experience with streaming and many related
> >> issues to the large datasets complications, so I would like to
> >> participate in such a break out.
> >>
> >> Perhaps the agenda item should just be to schedule such a meeting?
> >>
> >> Brad
> >>
> >> On Aug 9, 2010, at 2:35 PM, Luis Ibanez wrote:
> >>
> >>>
> >>> The Agenda for tomorrow's tcon has been posted at:
> >>>
> >>> http://www.itk.org/Wiki/Agenda%26Status_081010
> >>>
> >>> As discussed in the last tcon,
> >>> we are inverting the order of the agenda,
> >>> in order to address some topics for which
> >>> we have run out of time in previous calls.
> >>>
> >>> Please feel free to add any topics of your interest.
> >>>
> >>>
> >>>    Luis
> >>>
> >>>
> >>> <ATT00001..txt>
> >>
> >> ========================================================
> >>
> >> Bradley Lowekamp
> >>
> >> Lockheed Martin Contractor for
> >>
> >> Office of High Performance Computing and Communications
> >>
> >> National Library of Medicine
> >>
> >> blowekamp at mail.nih.gov <mailto:blowekamp at mail.nih.gov>
> >>
> >>
> >>
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> > <
> http://www.itk.org/pipermail/insight-users/attachments/20100809/424eaff2/attachment-0001.htm
> >
> >
> > ------------------------------
> >
> > Message: 4
> > Date: Mon, 09 Aug 2010 14:35:37 -0500
> > From: Oleksandr Dzyubak <adzyubak at gmail.com>
> > Subject: [Insight-users] itk::BilateralImageFilter extremely slow
> > To: insight-users <Insight-users at itk.org>
> > Message-ID: <4C605889.6020103 at gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> >
> > Dear ITK users and developers,
> >
> > A while ago for my experiments I ran into a need of using
> > a narrow kernel bilateral filter so I decided to give
> > the itk:: BilateralImageFilter class a try.
> > After some pre-tests with small test images, I ran a filter on real
> images.
> > Well, my first impression is somewhat discouraging.
> > But it might be that I am doing some terrible mistake which I do not see.
> >
> > My setup.
> > 1) Hardware: 4x4 core server with 64 bit Debian Linux.
> > 2) ITK-3.18 with p-threads support ON.
> > 3) Image 561x561x478.
> >
> > I followed the recommendations from the ITK user guide
> > and below are results.
> >
> > dzyubak at helium: /H61_Mo_721Views_July_31_2009$ time
> > ./Bilateral_LessAgressive h61_with_psf.hdr h61_with_psf_ds05_rs4.hdr 0.5
> 4.0
> >
> > With all 16 CPUs 100% busy after 1241m29.741s it was still running.
> > Thus I should cancel the run not having an output.
> >
> > real    1241m29.741s
> > user    19600m14.380s
> > sys    6m33.993s
> >
> > After I changed the parameters, I got something but it was not what I
> > wanted.
> >
> > dzyubak at helium: /H61_Mo_721Views_July_31_2009$ time
> > ./Bilateral_LessAgressive h61_with_psf.hdr h61_with_psf_ds005_rs4.hdr
> > 0.05 4.0
> >
> > real    63m46.774s
> > user    764m24.782s
> > sys    0m18.849s
> >
> > Since this filter worked extremely slow even with 16 horses under the
> hood,
> > I started digging the Insight Journal and found the contribution
> > "A Fast Approximation to the Bilateral Filter for ITK" by J. Woehr.
> >
> > I was attracted by the word "Fast" since it quite often means "faster
> > performance".
> > Even though I did not like the author's note "it is single threaded",
> > I decided to eventually try it and, to be fair,
> > I used exactly the same parameters as for itk:: BilateralImageFilter.
> >
> > dzyubak at helium: /H61_Mo_721Views_July_31_2009$  time
> > ./FastBilateral_LessAgressive h61_with_psf.hdr h61_with_psf_ds05_rs4.hdr
> > 0.5 4.0
> > ImageFileName: h61_with_psf.img
> >
> > real    4m49.325s
> > user    4m35.085s
> > sys    0m5.804s
> >
> > In the submission description J. Woehr said that FastBilateral
> > performs poorer for the narrow kernels thus if someone is
> > in a need of such cases (it is exactly me!),
> > then the itk:: BilateralImageFilter should be used instead.
> >
> > Well, I would like to but FastBilateral performed 200 times
> > as much vs itk:: BilateralImageFilter.
> > And in addition to that, for some kernel sizes it never
> > went out of the loop.
> >
> > What am I missing here?
> > Did someone experience the same filter behaver?
> > Is it wrong conditional causing such a "prolongated" loop?
> > Is there any recipe I could used to shorten
> > such unacceptable long run time of itk:: BilateralImageFilter?
> >
> > I appreciate any suggestions/discussions on this matter.
> >
> > Regards,
> >
> > Alex
> >
> >
> > ------------------------------
> >
> > Message: 5
> > Date: Mon, 9 Aug 2010 12:42:12 -0700 (PDT)
> > From: habibbaluwala2010 <habibbaluwala at gmail.com>
> > Subject: Re: [Insight-users] Problem with passing images to functions
> > To: insight-users at itk.org
> > Message-ID: <29391440.post at talk.nabble.com>
> > Content-Type: text/plain; charset=UTF-8
> >
> >
> > Hello Sergio,
> >                 Can you give me an example of how to use this in context
> > with the syntax? I am really thankful for the help.
> >
> >
> > Kind regards,
> >
> > Habib Baluwala
> >
> >
> >
> >
> > Sergio Vera wrote:
> >>
> >> Following advices from Luis Iba?ez in a previous mail of the list, we
> now
> >> use the following rules:
> >>
> >> const ITKImgType *ImgIn  when images are input to a method and
> >>
> >> ITKImgType::Pointer &ImgOut  when the image will be created inside the
> >> function
> >>
> >> regards
> >>
> >> 2010/8/6 D?enan Zuki? <dzenanz at gmail.com>
> >>
> >>> Use ImageType::Pointer. Here is an example:
> >>>
> >>> void calc2DJointHistogram(VisualizingImageType::Pointer x,
> >>> VisualizingImageType::Pointer y, std::string savefilename)
> >>> {
> >>> ...
> >>> }
> >>>
> >>> //calling it
> >>> VisualizingImageType::Pointer lVis, hVis;
> >>> ...
> >>> hVis=hReader->GetOutput();
> >>> calc2DJointHistogram(lVis, hVis, fnNoExt+"_LH.png");
> >>>
> >>> D?enan
> >>>
> >>> On Fri, Aug 6, 2010 at 15:32, habibbaluwala2010
> >>> <habibbaluwala at gmail.com>wrote:
> >>>
> >>>>
> >>>> Hi Everyone,
> >>>>                I am a biot confused on how can i pass an image with
> >>>> smart
> >>>> pointers to an outside function . I basically need this to avoid
> >>>> reproducing
> >>>> the code again and again and also to avoid composite filters. It would
> >>>> be
> >>>> very helpful if you can provide an example which does the job!!!
> Anyways
> >>>> looking forward to your replies.
> >>>> --
> >>>> View this message in context:
> >>>>
> >>>>
> http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29356451.html
> >>>> Sent from the ITK - Users mailing list archive at Nabble.com.
> >>>>
> >>>> _____________________________________
> >>>> 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
> >>>>
> >>>
> >>>
> >>> _____________________________________
> >>> 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
> >>>
> >>>
> >>
> >>
> >> --
> >> Sergio Vera
> >>
> >>  Alma IT Systems
> >>  C/ Vilana, 4B, 4? 1?
> >>  08022 Barcelona
> >>  T. (+34) 932 380 592
> >>  www.alma3d.com
> >>
> >> _____________________________________
> >> 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
> >>
> >>
> >
> > --
> > View this message in context:
> >
> http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29391440.html
> > Sent from the ITK - Users mailing list archive at Nabble.com.
> >
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
> > End of Insight-users Digest, Vol 76, Issue 24
> > *********************************************
> >
> >
> > _____________________________________
> > 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
> >
> >
> _____________________________________
> 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
>



-- 
Arpit Agrawal
Junior Undergraduate,
Dual Degree Communication and Signal Processing ,
Dept. of Electrical Engg, IITB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100810/43dcd15b/attachment-0001.htm>


More information about the Insight-users mailing list