Hi everyOne,
I am opening my multiframe compressed dicom image through bio-format.jar and Uncompressed images through Imagej.jar. I want to apply rotate,flip,invert option with images those are open with bio-Format.jar. How can i integrate i.e. how can i perform such operation with images those are opened with bio-Format.jar. It is same as when you open images in imagej--->plugIns---->LOCI---->bioFormat importer Option.And you perform all operation with those image in Imagej. Thanks With Warm Regards -------------------------------------------------------------------- Prashant Chandrakar Software Developer MedSynaptic Pvt Ltd 9270710943 [hidden email] "If the facts don't fit the theory, change the facts." |
Hi Prashant,
Images opened using the Bio-Formats plugin should function the same as any other images. You can process them with plugins and macros the same way. The only thing to watch out for is to avoid opening images as virtual stacks, because while that option will save you a large amount of memory and is good for browsing, you will not be able to perform image manipulation operations unless you first convert to a normal stack using Image>Duplicate, as described in this thread from the archive: < https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=15187>. -Curtis On Sun, Sep 28, 2008 at 11:46 PM, prashant < [hidden email]> wrote: > Hi everyOne, > > I am opening my multiframe compressed dicom image through > bio-format.jar > and Uncompressed images through Imagej.jar. > > I want to apply rotate,flip,invert option with images those are open > with bio-Format.jar. > How can i integrate i.e. how can i perform such operation with images > those are opened with bio-Format.jar. > > It is same as when you open images in > imagej--->plugIns---->LOCI---->bioFormat importer > Option.And you perform all operation with those image in Imagej. > > Thanks > > With Warm Regards > -------------------------------------------------------------------- > > Prashant Chandrakar > Software Developer > MedSynaptic Pvt Ltd > 9270710943 > [hidden email] > > "If the facts don't fit the theory, change the facts." > |
Thanks for your reply,
It will be very grateful if you can give me some code example. I am using the following code for opening the compressed image from bioFormat.jar. String id = directory + name; ImageReader red = new ImageReader(); red.setId(id); width = red.getSizeX(); height = red.getSizeY(); int num = noOfFrames = red.getImageCount(); //for reading the metadata of image mdr = new MetaDataReader(red); bimg = new BufferedImage[num]; for (int i = 0; i < num; i++) { bimg[i] = red.openImage(i); } red.close(true); It is giving me image in BufferedImage object form. thanks ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> To: <[hidden email]> Sent: Monday, September 29, 2008 9:35 PM Subject: Re: how integrate bioFormat with imagej > Hi Prashant, > > Images opened using the Bio-Formats plugin should function the same as any > other images. You can process them with plugins and macros the same way. > The > only thing to watch out for is to avoid opening images as virtual stacks, > because while that option will save you a large amount of memory and is > good > for browsing, you will not be able to perform image manipulation > operations > unless you first convert to a normal stack using Image>Duplicate, as > described in this thread from the archive: < > https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=15187>. > > -Curtis > > On Sun, Sep 28, 2008 at 11:46 PM, prashant < > [hidden email]> wrote: > >> Hi everyOne, >> >> I am opening my multiframe compressed dicom image through >> bio-format.jar >> and Uncompressed images through Imagej.jar. >> >> I want to apply rotate,flip,invert option with images those are >> open >> with bio-Format.jar. >> How can i integrate i.e. how can i perform such operation with >> images >> those are opened with bio-Format.jar. >> >> It is same as when you open images in >> imagej--->plugIns---->LOCI---->bioFormat importer >> Option.And you perform all operation with those image in Imagej. >> >> Thanks >> >> With Warm Regards >> -------------------------------------------------------------------- >> >> Prashant Chandrakar >> Software Developer >> MedSynaptic Pvt Ltd >> 9270710943 >> [hidden email] >> >> "If the facts don't fit the theory, change the facts." >> > |
Hi Prashant,
For information on using Bio-Formats to read in pixels as ImagePlus objects (ImageJ's image construct), you should read the Bio-Formats ImageJ page: http://www.loci.wisc.edu/ome/formats-imagej.html And specifically, the linked ImageJ plugin code examples: https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Read_Image.java https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Mass_Importer.java Once you are opening everything as ImagePlus objects, you can use the same ImageJ-based processing techniques on both the compressed and uncompressed data. -Curtis P. S. Your code looks fine except for the "MetaDataReader" object -- to my knowledge that class is not part of ImageJ or Bio-Formats. On Tue, Sep 30, 2008 at 12:28 AM, prashant < [hidden email]> wrote: > Thanks for your reply, > > It will be very grateful if you can give me some code example. > I am using the following code for opening the compressed image from > bioFormat.jar. > > String id = directory + name; > > ImageReader red = new ImageReader(); > > red.setId(id); > > width = red.getSizeX(); > > height = red.getSizeY(); > > int num = noOfFrames = red.getImageCount(); > > //for reading the metadata of image > > mdr = new MetaDataReader(red); > > bimg = new BufferedImage[num]; > > for (int i = 0; i < num; i++) > > { > > bimg[i] = red.openImage(i); > > } > > red.close(true); > > It is giving me image in BufferedImage object form. > thanks > > > > > > > ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> > To: <[hidden email]> > Sent: Monday, September 29, 2008 9:35 PM > Subject: Re: how integrate bioFormat with imagej > > > > Hi Prashant, >> >> Images opened using the Bio-Formats plugin should function the same as any >> other images. You can process them with plugins and macros the same way. >> The >> only thing to watch out for is to avoid opening images as virtual stacks, >> because while that option will save you a large amount of memory and is >> good >> for browsing, you will not be able to perform image manipulation >> operations >> unless you first convert to a normal stack using Image>Duplicate, as >> described in this thread from the archive: < >> https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=15187>. >> >> -Curtis >> >> On Sun, Sep 28, 2008 at 11:46 PM, prashant < >> [hidden email]> wrote: >> >> Hi everyOne, >>> >>> I am opening my multiframe compressed dicom image through >>> bio-format.jar >>> and Uncompressed images through Imagej.jar. >>> >>> I want to apply rotate,flip,invert option with images those are open >>> with bio-Format.jar. >>> How can i integrate i.e. how can i perform such operation with >>> images >>> those are opened with bio-Format.jar. >>> >>> It is same as when you open images in >>> imagej--->plugIns---->LOCI---->bioFormat importer >>> Option.And you perform all operation with those image in Imagej. >>> >>> Thanks >>> >>> With Warm Regards >>> -------------------------------------------------------------------- >>> >>> Prashant Chandrakar >>> Software Developer >>> MedSynaptic Pvt Ltd >>> 9270710943 >>> [hidden email] >>> >>> "If the facts don't fit the theory, change the facts." >>> >>> >> |
Thanks for reply,
I tried the following code and its working for me. As in your example you are creating ImageStack object then passes its object to Image plus ImageStack stack = new ImageStack(width,height); ImagePlus imp = new ImagePlus(name,stack); What i did is After opening image from following code i pass the BufferedImage to ImagePlus object and thats it ImagePlus imp = new ImagePlus("",imgObject); are It affects something? public ImagePlus openImage(String directory, String name) { try { String id = directory + name; ImageReader red = new ImageReader(); red.setId(id); ////for reading the metadata of image mdr = new MetaDataReader(red); width = red.getSizeX(); height = red.getSizeY(); int num = red.getImageCount(); bimg = new BufferedImage[num]; for (int i = 0; i < num; i++) { bimg[i] = red.openImage(i); if (i == 0) { img = bimg[i]; } } red.close(true); } catch (Exception e) { System.out.println(e); return null; } return new ImagePlus("",img); } thanks ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> To: <[hidden email]> Sent: Tuesday, September 30, 2008 7:44 PM Subject: Re: how integrate bioFormat with imagej > Hi Prashant, > > For information on using Bio-Formats to read in pixels as ImagePlus > objects > (ImageJ's image construct), you should read the Bio-Formats ImageJ page: > http://www.loci.wisc.edu/ome/formats-imagej.html > > And specifically, the linked ImageJ plugin code examples: > https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Read_Image.java > https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Mass_Importer.java > > Once you are opening everything as ImagePlus objects, you can use the same > ImageJ-based processing techniques on both the compressed and uncompressed > data. > > -Curtis > > P. S. Your code looks fine except for the "MetaDataReader" object -- to my > knowledge that class is not part of ImageJ or Bio-Formats. > > On Tue, Sep 30, 2008 at 12:28 AM, prashant < > [hidden email]> wrote: > >> Thanks for your reply, >> >> It will be very grateful if you can give me some code example. >> I am using the following code for opening the compressed image from >> bioFormat.jar. >> >> String id = directory + name; >> >> ImageReader red = new ImageReader(); >> >> red.setId(id); >> >> width = red.getSizeX(); >> >> height = red.getSizeY(); >> >> int num = noOfFrames = red.getImageCount(); >> >> //for reading the metadata of image >> >> mdr = new MetaDataReader(red); >> >> bimg = new BufferedImage[num]; >> >> for (int i = 0; i < num; i++) >> >> { >> >> bimg[i] = red.openImage(i); >> >> } >> >> red.close(true); >> >> It is giving me image in BufferedImage object form. >> thanks >> >> >> >> >> >> >> ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> >> To: <[hidden email]> >> Sent: Monday, September 29, 2008 9:35 PM >> Subject: Re: how integrate bioFormat with imagej >> >> >> >> Hi Prashant, >>> >>> Images opened using the Bio-Formats plugin should function the same as >>> any >>> other images. You can process them with plugins and macros the same way. >>> The >>> only thing to watch out for is to avoid opening images as virtual >>> stacks, >>> because while that option will save you a large amount of memory and is >>> good >>> for browsing, you will not be able to perform image manipulation >>> operations >>> unless you first convert to a normal stack using Image>Duplicate, as >>> described in this thread from the archive: < >>> https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=15187>. >>> >>> -Curtis >>> >>> On Sun, Sep 28, 2008 at 11:46 PM, prashant < >>> [hidden email]> wrote: >>> >>> Hi everyOne, >>>> >>>> I am opening my multiframe compressed dicom image through >>>> bio-format.jar >>>> and Uncompressed images through Imagej.jar. >>>> >>>> I want to apply rotate,flip,invert option with images those are >>>> open >>>> with bio-Format.jar. >>>> How can i integrate i.e. how can i perform such operation with >>>> images >>>> those are opened with bio-Format.jar. >>>> >>>> It is same as when you open images in >>>> imagej--->plugIns---->LOCI---->bioFormat importer >>>> Option.And you perform all operation with those image in Imagej. >>>> >>>> Thanks >>>> >>>> With Warm Regards >>>> -------------------------------------------------------------------- >>>> >>>> Prashant Chandrakar >>>> Software Developer >>>> MedSynaptic Pvt Ltd >>>> 9270710943 >>>> [hidden email] >>>> >>>> "If the facts don't fit the theory, change the facts." >>>> >>>> >>> > |
In reply to this post by ctrueden
Thanks for your reply,
I saw you example.But i have a problem. In example they uses IFormatReader r = new ChannelSeparator(); But for opening my Images i am using following code. ImageReader red = new ImageReader(); So how can i create stack with these object. When i pass Object red to Util.openProcessor() method it is giving me error. Because it takes IFormatReader object as parameter. So what can i do,Please help me ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> To: <[hidden email]> Sent: Tuesday, September 30, 2008 7:44 PM Subject: Re: how integrate bioFormat with imagej > Hi Prashant, > > For information on using Bio-Formats to read in pixels as ImagePlus > objects > (ImageJ's image construct), you should read the Bio-Formats ImageJ page: > http://www.loci.wisc.edu/ome/formats-imagej.html > > And specifically, the linked ImageJ plugin code examples: > https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Read_Image.java > https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Mass_Importer.java > > Once you are opening everything as ImagePlus objects, you can use the same > ImageJ-based processing techniques on both the compressed and uncompressed > data. > > -Curtis > > P. S. Your code looks fine except for the "MetaDataReader" object -- to my > knowledge that class is not part of ImageJ or Bio-Formats. > > On Tue, Sep 30, 2008 at 12:28 AM, prashant < > [hidden email]> wrote: > >> Thanks for your reply, >> >> It will be very grateful if you can give me some code example. >> I am using the following code for opening the compressed image from >> bioFormat.jar. >> >> String id = directory + name; >> >> ImageReader red = new ImageReader(); >> >> red.setId(id); >> >> width = red.getSizeX(); >> >> height = red.getSizeY(); >> >> int num = noOfFrames = red.getImageCount(); >> >> //for reading the metadata of image >> >> mdr = new MetaDataReader(red); >> >> bimg = new BufferedImage[num]; >> >> for (int i = 0; i < num; i++) >> >> { >> >> bimg[i] = red.openImage(i); >> >> } >> >> red.close(true); >> >> It is giving me image in BufferedImage object form. >> thanks >> >> >> >> >> >> >> ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> >> To: <[hidden email]> >> Sent: Monday, September 29, 2008 9:35 PM >> Subject: Re: how integrate bioFormat with imagej >> >> >> >> Hi Prashant, >>> >>> Images opened using the Bio-Formats plugin should function the same as >>> any >>> other images. You can process them with plugins and macros the same way. >>> The >>> only thing to watch out for is to avoid opening images as virtual >>> stacks, >>> because while that option will save you a large amount of memory and is >>> good >>> for browsing, you will not be able to perform image manipulation >>> operations >>> unless you first convert to a normal stack using Image>Duplicate, as >>> described in this thread from the archive: < >>> https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=15187>. >>> >>> -Curtis >>> >>> On Sun, Sep 28, 2008 at 11:46 PM, prashant < >>> [hidden email]> wrote: >>> >>> Hi everyOne, >>>> >>>> I am opening my multiframe compressed dicom image through >>>> bio-format.jar >>>> and Uncompressed images through Imagej.jar. >>>> >>>> I want to apply rotate,flip,invert option with images those are >>>> open >>>> with bio-Format.jar. >>>> How can i integrate i.e. how can i perform such operation with >>>> images >>>> those are opened with bio-Format.jar. >>>> >>>> It is same as when you open images in >>>> imagej--->plugIns---->LOCI---->bioFormat importer >>>> Option.And you perform all operation with those image in Imagej. >>>> >>>> Thanks >>>> >>>> With Warm Regards >>>> -------------------------------------------------------------------- >>>> >>>> Prashant Chandrakar >>>> Software Developer >>>> MedSynaptic Pvt Ltd >>>> 9270710943 >>>> [hidden email] >>>> >>>> "If the facts don't fit the theory, change the facts." >>>> >>>> >>> > |
Hi Prashant,
IFormatReader is an interface which is implemented by several classes including ImageReader, so it is fine to pass an instance of ImageReader to the Util.openProcessors(IFormatReader, int) method. This is very basic -- I suggest you study up on your Java. If you are receiving an error, it is surely due to some other issue. Also, I would ask that you please use the ImageJ mailing list only for questions specifically about ImageJ, such as the ImageJ API. For questions about the Bio-Formats API, please use the Bio-Formats email address. Thanks, Curtis On Wed, Oct 1, 2008 at 8:04 AM, prashant < [hidden email]> wrote: > Thanks for your reply, > > I saw you example.But i have a problem. > In example they uses > > IFormatReader r = new ChannelSeparator(); > > But for opening my Images i am using following code. > > ImageReader red = new ImageReader(); > > So how can i create stack with these object. > > When i pass Object red to Util.openProcessor() method > > it is giving me error. > > Because it takes IFormatReader object as parameter. > > So what can i do,Please help me > > > > > > > > > > > > > > > > > ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> > To: <[hidden email]> > Sent: Tuesday, September 30, 2008 7:44 PM > > Subject: Re: how integrate bioFormat with imagej > > > Hi Prashant, >> >> For information on using Bio-Formats to read in pixels as ImagePlus >> objects >> (ImageJ's image construct), you should read the Bio-Formats ImageJ page: >> http://www.loci.wisc.edu/ome/formats-imagej.html >> >> And specifically, the linked ImageJ plugin code examples: >> >> https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Read_Image.java >> >> https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/Mass_Importer.java >> >> Once you are opening everything as ImagePlus objects, you can use the same >> ImageJ-based processing techniques on both the compressed and uncompressed >> data. >> >> -Curtis >> >> P. S. Your code looks fine except for the "MetaDataReader" object -- to my >> knowledge that class is not part of ImageJ or Bio-Formats. >> >> On Tue, Sep 30, 2008 at 12:28 AM, prashant < >> [hidden email]> wrote: >> >> Thanks for your reply, >>> >>> It will be very grateful if you can give me some code example. >>> I am using the following code for opening the compressed image from >>> bioFormat.jar. >>> >>> String id = directory + name; >>> >>> ImageReader red = new ImageReader(); >>> >>> red.setId(id); >>> >>> width = red.getSizeX(); >>> >>> height = red.getSizeY(); >>> >>> int num = noOfFrames = red.getImageCount(); >>> >>> //for reading the metadata of image >>> >>> mdr = new MetaDataReader(red); >>> >>> bimg = new BufferedImage[num]; >>> >>> for (int i = 0; i < num; i++) >>> >>> { >>> >>> bimg[i] = red.openImage(i); >>> >>> } >>> >>> red.close(true); >>> >>> It is giving me image in BufferedImage object form. >>> thanks >>> >>> >>> >>> >>> >>> >>> ----- Original Message ----- From: "Curtis Rueden" <[hidden email]> >>> To: <[hidden email]> >>> Sent: Monday, September 29, 2008 9:35 PM >>> Subject: Re: how integrate bioFormat with imagej >>> >>> >>> >>> Hi Prashant, >>> >>>> >>>> Images opened using the Bio-Formats plugin should function the same as >>>> any >>>> other images. You can process them with plugins and macros the same way. >>>> The >>>> only thing to watch out for is to avoid opening images as virtual >>>> stacks, >>>> because while that option will save you a large amount of memory and is >>>> good >>>> for browsing, you will not be able to perform image manipulation >>>> operations >>>> unless you first convert to a normal stack using Image>Duplicate, as >>>> described in this thread from the archive: < >>>> https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=15187>. >>>> >>>> -Curtis >>>> >>>> On Sun, Sep 28, 2008 at 11:46 PM, prashant < >>>> [hidden email]> wrote: >>>> >>>> Hi everyOne, >>>> >>>>> >>>>> I am opening my multiframe compressed dicom image through >>>>> bio-format.jar >>>>> and Uncompressed images through Imagej.jar. >>>>> >>>>> I want to apply rotate,flip,invert option with images those are >>>>> open >>>>> with bio-Format.jar. >>>>> How can i integrate i.e. how can i perform such operation with >>>>> images >>>>> those are opened with bio-Format.jar. >>>>> >>>>> It is same as when you open images in >>>>> imagej--->plugIns---->LOCI---->bioFormat importer >>>>> Option.And you perform all operation with those image in Imagej. >>>>> >>>>> Thanks >>>>> >>>>> With Warm Regards >>>>> -------------------------------------------------------------------- >>>>> >>>>> Prashant Chandrakar >>>>> Software Developer >>>>> MedSynaptic Pvt Ltd >>>>> 9270710943 >>>>> [hidden email] >>>>> >>>>> "If the facts don't fit the theory, change the facts." >>>>> >>>>> >>>>> >>>> >> |
Free forum by Nabble | Edit this page |