[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: [Imgcif-l] renaming a data block?
- To: The Crystallographic Binary File and its imgCIF application to image data <imgcif-l@iucr.org>
- Subject: Re: [Imgcif-l] renaming a data block?
- From: "Herbert J. Bernstein" <yaya@bernstein-plus-sons.com>
- Date: Tue, 14 Oct 2008 21:48:15 -0400 (EDT)
- In-Reply-To: <61BAD5A4-6FCF-4B97-AACA-B776740C7EBE@rayonix.com>
- References: <20080826195337.H76753@epsilon.pair.com><279aad2a0809172141u3034905bq6ba660c89703b4bb@mail.gmail.com><84F0D152-F08A-485B-B9FD-AA2011B1836E@mrc-lmb.cam.ac.uk><20080918083938.I64013@epsilon.pair.com><279aad2a0809231659g560a410ds3e1bcdf3a6809ae3@mail.gmail.com><20080923224741.M51207@epsilon.pair.com><279aad2a0809232135y1522bf21g1105afcc984fb9c4@mail.gmail.com><20080924064800.D66789@epsilon.pair.com><279aad2a0809301721i52e5ae91i39083f29a52ef917@mail.gmail.com><a0624080bc508798078a4@192.168.2.103><279aad2a0810012343s5e904d96kb113c043e0a0b5ae@mail.gmail.com><20081002084239.E47913@epsilon.pair.com><61BAD5A4-6FCF-4B97-AACA-B776740C7EBE@rayonix.com>
Dear Michael, Please note cbf_set_datablockname, below. Note that you have to be in the datablock you intend to change. The first thing the code does is to look for a parent of type CBF_DATABLOCK. It can fail if the target name is already in use. In that case you need to copy instead of rename. The necessary copy loop is in the code of cif2cbf. I did not get your sf mail (my spam filter is very tight). Just email me your sf username and I'll add you to the CBFlib project. I'll be a bit out of touch for a few days -- I am off to Dubuque for a meeting. Regards, Herbert At the API level: 2.3.13 cbf_set_datablockname, cbf_set_saveframename PROTOTYPE #include "cbf.h" int cbf_set_datablockname (cbf_handle handle, const char *datablockname); int cbf_set_saveframename (cbf_handle handle. const char *saveframename); DESCRIPTION cbf_set_datablockname changes the name of the current data block to datablockname. cbf_set_saveframename changes the name of the current save frame to saveframename. If a data block or save frame with this name already exists (comparison is case-insensitive), the function returns CBF_IDENTICAL. ARGUMENTS handle CBF handle. datablockname The new data block name. datablockname The new save frame name. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO 2.3.5 cbf_new_datablock, cbf_new_saveframe 2.3.14 cbf_reset_datablocks 2.3.15 cbf_reset_datablock, cbf_reset_saveframe 2.3.17 cbf_remove_datablock, cbf_remove_saveframe 2.3.42 cbf_datablock_name ===================================================== Herbert J. Bernstein, Professor of Computer Science Dowling College, Kramer Science Center, KSC 121 Idle Hour Blvd, Oakdale, NY, 11769 +1-631-244-3035 yaya@dowling.edu ===================================================== On Tue, 14 Oct 2008, Michael Blum wrote: > Return-path: <imgcif-l-bounces@iucr.org> > From: Michael Blum <blum@rayonix.com> > To: The Crystallographic Binary File and its imgCIF application to image data <imgcif-l@iucr.org> > In-Reply-To: <20081002084239.E47913@epsilon.pair.com> > Mime-Version: 1.0 (Apple Message framework v929.2) > Date: Tue, 14 Oct 2008 18:09:25 -0500 > Subject: [Imgcif-l] renaming a data block? > > Hi, > > Can someone tell me how I would rename a data block using CBFlib? > > The situation is that I am reading in a template CBF file that > contains some extra categories (eg, to describe a beamline, or > goniometer) > This file must have a data block and this becomes the working data > block. > I am then adding our own categories (detector and data collection > parameters) to this data block and/or replacing nominal values with > dynamically generated values. I then want to write out the CBF file. > > I want the data block written out to have a name specified by the > program, not the name in the template file. > I seem to be able to replace anything else (categories, and values), > but not the data block name. > > Actually, I would like it to be more flexible. The purpose for which > I use the template file is to allow the user to either 1) add > additional categories and columns to our nominal CBF header data or 2) > to override our internally generated values. I want the data block > name to behave the same way, but it cannot because the template file > must have a data block name and this always overrides my internal name. > > Thanks for any ideas. > > Michael > > PS - Herb - I sent a request through the sourceforge mail system to be > added as a developer so that I can post some files. Maybe you didn't > ge the email? > _______________ > Michael L. Blum Toll Free: 877-627-XRAY (627-9729) > Rayonix, LLC Tel: 847-869-1548 > 1880 Oak Avenue Fax: 847-869-1587 > Evanston, IL 60201 Email: blum@rayonix.com > USA WWW: www.rayonix.com > > > > > > _______________________________________________ > imgcif-l mailing list > imgcif-l@iucr.org > http://scripts.iucr.org/mailman/listinfo/imgcif-l > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > > Hi, > > Can someone tell me how I would rename a data block using CBFlib? > > The situation is that I am reading in a template CBF file that =20 > contains some extra categories (eg, to describe a beamline, or =20 > goniometer) > This file must have a data block and this becomes the working data =20 > block. > I am then adding our own categories (detector and data collection =20 > parameters) to this data block and/or replacing nominal values with =20 > dynamically generated values. I then want to write out the CBF file. > > I want the data block written out to have a name specified by the =20 > program, not the name in the template file. > I seem to be able to replace anything else (categories, and values), =20 > but not the data block name. > > Actually, I would like it to be more flexible. The purpose for which =20 > I use the template file is to allow the user to either 1) add =20 > additional categories and columns to our nominal CBF header data or 2) =20 > to override our internally generated values. I want the data block =20 > name to behave the same way, but it cannot because the template file =20 > must have a data block name and this always overrides my internal name. > > Thanks for any ideas. > > Michael > > PS - Herb - I sent a request through the sourceforge mail system to be =20 > added as a developer so that I can post some files. Maybe you didn't =20 > ge the email? > _______________ > Michael L. Blum Toll Free: 877-627-XRAY (627-9729) > Rayonix, LLC Tel: 847-869-1548 > 1880 Oak Avenue Fax: 847-869-1587 > Evanston, IL 60201 Email: blum@rayonix.com > USA WWW: www.rayonix.com > > > > > > _______________________________________________ > imgcif-l mailing list > imgcif-l@iucr.org > http://scripts.iucr.org/mailman/listinfo/imgcif-l > > _______________________________________________ imgcif-l mailing list imgcif-l@iucr.org http://scripts.iucr.org/mailman/listinfo/imgcif-l
Reply to: [list | sender only]
- Follow-Ups:
- Re: [Imgcif-l] renaming a data block? (Michael Blum)
- References:
- [Imgcif-l] proposed change in first line of imgcif files (Herbert J. Bernstein)
- Re: [Imgcif-l] proposed change in first line of imgcif files (James Hester)
- Re: [Imgcif-l] proposed change in first line of imgcif files (Harry Powell)
- Re: [Imgcif-l] proposed change in first line of imgcif files (Herbert J. Bernstein)
- Re: [Imgcif-l] proposed change in first line of imgcif files (James Hester)
- Re: [Imgcif-l] proposed change in first line of imgcif files (James Hester)
- Re: [Imgcif-l] proposed change in first line of imgcif files (James Hester)
- Re: [Imgcif-l] proposed change in first line of imgcif files (James Hester)
- Re: [Imgcif-l] proposed change in first line of imgcif files (Herbert J. Bernstein)
- [Imgcif-l] renaming a data block? (Michael Blum)
- Prev by Date: [Imgcif-l] renaming a data block?
- Next by Date: Re: [Imgcif-l] renaming a data block?
- Prev by thread: [Imgcif-l] renaming a data block?
- Next by thread: Re: [Imgcif-l] renaming a data block?
- Index(es):