comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL and sqlite
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL and sqlite [message #63460] Mon, 10 November 2008 01:56 Go to next message
Michi is currently offline  Michi
Messages: 9
Registered: December 2007
Junior Member
Hello all,

I frequently have to deal with large amounts (~10000) of DICOM-files.
More specific, I have to query all these files for certain DICOM-tags
such as image number, echo time, series name, series UID, acquisition
time and pick some files that match certain criteria. ATM, this is
done by reading in the whole directory. This is tedious if it has to
be done more than once.
I came up with the idea, that this is a perfect job for a sqlite-
database (www.sqlite.org), that is kept entirely in one file with no
need to have a server running such as with mysql (This is essential
for our application, since we distribute it as a virtual machine to
physicians, and you can't expect them to install a mysql-server).
There are many language bindings for sqlite, but I haven't found one
for IDL.
Does anybody have experience with using sqlite from IDL? This would
just be the perfect tool for this job...

Best regards,

Michi
Re: IDL and sqlite [message #63538 is a reply to message #63460] Wed, 12 November 2008 00:28 Go to previous messageGo to next message
Michi is currently offline  Michi
Messages: 9
Registered: December 2007
Junior Member
Thanks for the answers!

Too bad - I was hoping for an implementation such as in python, where
you can just connect to a database and do queries and insertions from
the program.
All in all, the more I use IDL, the more I have the impression that it
is outdatet.
I keep wondering if I couldn't do the same stuff in a modern language,
save a lot of $$$ and have more features...
Re: IDL and sqlite [message #63571 is a reply to message #63460] Fri, 14 November 2008 16:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler writes:

> And maybe they *are* seeing this in sales as there are 10 new users for
> every one like me so IDL sales will only grow

Any conspiracy buffs out there?

I got to thinking about Rick's last post as I was folding
my laundry and trying to calm down after that crack about
"sounding like David". Here is the interesting thing:
every time I am around an ITTVIS person I ask the question,
"Who are you selling this...well, let me say, "stuff"...
to?" And I have yet to receive an answer.

Now, I find that interesting. ITTVIS seldom fails to answer
my questions, but this is one I have started to ask more
pointedly as I have noticed it is never answered. Last week
I got the answer "Maybe ITTVIS doesn't want you to know who
their customers are."

Now, that might be a pretty good answer, if I was competing
with them for business, like I used to, but it doesn't much
apply anymore. And, heck, I don't want to do any business
with anyone buying IDL for iTools anyway, so...

And then, as I was folding my underwear and thinking it
might be time to help the economy out by making a few
purchases, it all became clear to me...

The last time I was up to ITTVIS I had a very hard time
getting inside. No one even answers the phone when you
call the company. If you don't know the name of the person
you want to talk to, you are SOL. All black ops and recorded
messages. And then someone mentioned that part of the second
floor was off limits even to ITTVIS employees. Some kind of
super-secret deal going on behind closed doors.

Plus, I was talking to the organizers of the IDL User's Group
meeting, and they mentioned they were doing another meeting just
like it in the Washington area, but that it was closed to the
public. The only way to get in was to have a Secret Clearance.

So, here is what I think. Homeland Security has a HUGE contract
with ITTVIS to produce some super-secret software (probably with
ENVI). Those hapless souls don't have a clue about software and
probably lap the iTool stuff up. (I think I mentioned earlier
that "software consulting" was the fastest growing part of ITTVIS's
business.) Do you see where I am going with this? They don't need
us. They aren't even selling this stuff to us. And they don't want
us to know WHO they are selling it to.

Boy, it's all clear now!

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL and sqlite [message #63572 is a reply to message #63460] Fri, 14 November 2008 15:54 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
I agree with Robbie, an improved dataminer should be part of the
standard IDL library. Database connectivity is critical to a number of
things I do every day and I end up using MATLAB or Python* for these
tasks, even though IDL would in other ways be a perfect fit.

I'm surprised that no one has mentioned dataminer. I believe that it
ships with ODBC drivers for the major platforms. I've played around
with it a bit and while it was a little awkward it works. It costs
money, but it may be a viable solution to your problem.

In MATLAB I wrote a db interface using MS ADODB via MATLAB's COM
interface which works fantastically (better than their expensive
database toolbox IMHO). ADODB is windows only, but I thought I would try
the same in IDL and while it works it is very limited because of IDL's
lack of built-in data structures (IDL's COM interface cannot return
mixed type data which is just about any row of any database ever
conceived). I stopped development because performance was a requirement
and the thought of breaking queries based on the type of the returned
data and assembling the output after the fact was ludicrous (and there
were what I though were bugs in the COM interface). BUT, this might
work for you, especially since you can design the tables around these
limitations. And if I understand what you want to do you could do it
all with using all char typed columns. Possibly a solution if you can
stomach the windows only aspect.

I'd be happy to share the prototyping code I have which would get you
started.

-Rick


* We've talked about this a lot lately but this exemplifies the
trade-off ITTVIS is playing with when they focus so much of their
development on point-and-click analysis tools like the iTools at the
cost of additions to core functionality. They may be drawing in more
users who are uncomfortable with programming and like the features of
the iTools but they're losing developers who want a "smart and full
featured" language (whatever that is, you get the idea).

They probably don't see this in sales yet as most shops have lots of
legacy code that is still floating around but 75% of the production code
I am writing now is in Python+Numpy+Scipy+pyQt. At some point I will
not be able to justify the cost of my IDL license as more and more code
is retired.

And maybe they *are* seeing this in sales as there are 10 new users for
every one like me so IDL sales will only grow. That's good, although I
guess I am a little disappointed to see what may be the beginning of the
end of a personal era.

Sheesh. Now I am starting to sound like David. ;)




Michi wrote:
> Hello all,
>
> I frequently have to deal with large amounts (~10000) of DICOM-files.
> More specific, I have to query all these files for certain DICOM-tags
> such as image number, echo time, series name, series UID, acquisition
> time and pick some files that match certain criteria. ATM, this is
> done by reading in the whole directory. This is tedious if it has to
> be done more than once.
> I came up with the idea, that this is a perfect job for a sqlite-
> database (www.sqlite.org), that is kept entirely in one file with no
> need to have a server running such as with mysql (This is essential
> for our application, since we distribute it as a virtual machine to
> physicians, and you can't expect them to install a mysql-server).
> There are many language bindings for sqlite, but I haven't found one
> for IDL.
> Does anybody have experience with using sqlite from IDL? This would
> just be the perfect tool for this job...
>
> Best regards,
>
> Michi
Re: IDL and sqlite [message #63576 is a reply to message #63460] Fri, 14 November 2008 14:15 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Robbie schrieb:
> I agree that database adapters should be considered a core component
> of the IDL suite.
> The lack of an adapter encourages programmers to use IDL in
> complicated ways. For example, I have used lock files to attempt to
> block access to shared files over a network drive. I also had work out
> a way to merge the contents of save files when two people are trying
> to write at the same time. Needless to say, it was a complete
> disaster.

You can buy IDL DataMiner. Don't forget idl is not FOSS.
The IDL DataMiner is an Open Database Connectivity (ODBC) interface that
allows IDL users to access and manipulate information from a variety of
database
http://www.ittvis.com/portals/0/pdfs/idl/datamine.pdf

Reimar
Re: IDL and sqlite [message #63578 is a reply to message #63538] Fri, 14 November 2008 13:53 Go to previous messageGo to next message
Robbie is currently offline  Robbie
Messages: 165
Registered: February 2006
Senior Member
I agree that database adapters should be considered a core component
of the IDL suite.
The lack of an adapter encourages programmers to use IDL in
complicated ways. For example, I have used lock files to attempt to
block access to shared files over a network drive. I also had work out
a way to merge the contents of save files when two people are trying
to write at the same time. Needless to say, it was a complete
disaster.

I've see a few free database adapters floating around, but many of
them miss important features such as type conversion and string
escaping. I am concerned that this is going to make IDL look bad in
the longer term, because there will be a whole heap of applications in
the user community which are written poorly.

However, Michi, in your particular case I cannot see how you will have
a problem. AFAIK, you are simply implementing a patient selector for
DICOM files. I can't see why you have a problem simply caching DICOM
tags in a sav file. I have done this myself and it seems to work
reasonably well for a single user situation. If I were implementing
the same thing in Python then I would consider using freeze/thaw in
preference to SQLlite.

If you are doing anything beyond a patient selector then you would
probably need a database.

Robbie
Re: IDL and sqlite [message #63668 is a reply to message #63572] Sat, 15 November 2008 00:09 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Rick Towler schrieb:
> I agree with Robbie, an improved dataminer should be part of the
> standard IDL library. Database connectivity is critical to a number of
> things I do every day and I end up using MATLAB or Python* for these
> tasks, even though IDL would in other ways be a perfect fit.
>
> I'm surprised that no one has mentioned dataminer.

I did two hours before.

Reimar
Re: IDL and sqlite [message #63669 is a reply to message #63460] Fri, 14 November 2008 17:16 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler writes:

> I guess we can hope that some of that money is directed into developing
> generally useful additions to IDL's core that everybody benefits from.

At the very least, we have a chance to feel patriotic as we
write that check to ITTVIS for IDL "maintenance".

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL and sqlite [message #63670 is a reply to message #63571] Fri, 14 November 2008 17:09 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
David Fanning wrote:
> Rick Towler writes:
>
>> And maybe they *are* seeing this in sales as there are 10 new users for
>> every one like me so IDL sales will only grow
>
> Any conspiracy buffs out there?
>

<snip>

> So, here is what I think. Homeland Security has a HUGE contract
> with ITTVIS to produce some super-secret software (probably with
> ENVI).

I've suspected something like this for a while. The few notable core
features they have added recently to IDL are image processing and
analysis routines. I haven't been to the Boulder office in years so I
am completely unaware of the changes there but even I could put together
IDL + IMINT = big money for ITTVIS
(http://en.wikipedia.org/wiki/IMINT). And I'm not a big conspiracy
theorist (except for those fake moon landings :)

I guess we can hope that some of that money is directed into developing
generally useful additions to IDL's core that everybody benefits from.

-Rick
Re: IDL and sqlite [message #63752 is a reply to message #63668] Mon, 17 November 2008 08:24 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Reimar Bauer wrote:
> Rick Towler schrieb:
>> I'm surprised that no one has mentioned dataminer.
>
> I did two hours before.

I type slow :)
Re: IDL and sqlite [message #63762 is a reply to message #63571] Mon, 17 November 2008 07:34 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Nov 14, 7:45 pm, David Fanning <n...@dfanning.com> wrote:
> Rick Towler writes:
>> And maybe they *are* seeing this in sales as there are 10 new users for
>> every one like me so IDL sales will only grow
>
> Any conspiracy buffs out there?

[...]

> Boy, it's all clear now!

Makes sense to me - time to start wearing my IDL hat:
http://people.csail.mit.edu/rahimi/helmet/

This is even more important if you live at high altitudes like
Colorado (closer to the satellites) ;-)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Read ASCII
Next Topic: Re: Calculate the mean of many images

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:41:23 PDT 2025

Total time taken to generate the page: 0.00705 seconds